dynamise MorePage

pull/28/head
maxime.BATISTA@etu.uca.fr 2 years ago
parent 9bac4e84fc
commit b48926f280

@ -15,14 +15,14 @@
ColumnSpacing="30"> ColumnSpacing="30">
<Image <Image
Source="default_profile_picture.png"/> x:Name="ProfileImage"/>
<Label <Label
x:Name="ProfileName"
Grid.Column="1" Grid.Column="1"
FontSize="24" FontSize="24"
VerticalTextAlignment="Center" VerticalTextAlignment="Center"
TextColor="{StaticResource TextColorPrimary}" TextColor="{StaticResource TextColorPrimary}"
Text="Adom Shafi"
FontFamily="Poppins"/> FontFamily="Poppins"/>
</Grid> </Grid>

@ -2,8 +2,14 @@ namespace ShoopNCook.Pages;
public partial class MorePage : ContentPage public partial class MorePage : ContentPage
{ {
public MorePage() public MorePage(): this("Adom Shafi", ImageSource.FromFile("default_profile_picture.png"))
{ {
InitializeComponent();
} }
public MorePage(string userName, ImageSource userImage)
{
InitializeComponent();
ProfileImage.Source = userImage;
ProfileName.Text = userName;
}
} }

@ -1,5 +1,3 @@
using System.Xml.Linq;
namespace ShoopNCook.Views; namespace ShoopNCook.Views;
public partial class HeadedButton : ContentView public partial class HeadedButton : ContentView

Loading…
Cancel
Save