Hey guys,
I am trying to make a very basic contentPage with just 2 buttons and an image. But no matter what I am trying, the image does not show .. Am I getting crazy or just missing something ? I made sure to include the image in both iOS and Android's Resource folders!
public class MainMenuPage : ContentPage
{
public MainMenuPage ()
{
Content = new StackLayout () {
Padding = new Thickness(0, Device.OnPlatform(20, 0, 0), 0, 0),
//Orientation = StackOrientation.Vertical,
VerticalOptions = LayoutOptions.FillAndExpand,
Children = {
new StackLayout(){
Orientation = StackOrientation.Horizontal,
HorizontalOptions = LayoutOptions.FillAndExpand,
Children = {
new Button(){
Text = "Profile",
TextColor = Color.FromRgb(161,161,161),
BorderColor = Color.FromRgb(161,161,161),
BorderWidth = 1,
HeightRequest = 50,
BorderRadius = 1,
HorizontalOptions = LayoutOptions.FillAndExpand,
},
new Button(){
Text = "Skills",
TextColor = Color.FromRgb(161,161,161),
BorderColor = Color.FromRgb(161,161,161),
BorderWidth = 1,
HeightRequest = 40,
BorderRadius = 1,
HorizontalOptions = LayoutOptions.FillAndExpand,
},
},
},
new Image () {
IsVisible = true,
Aspect = Aspect.AspectFit,
Source = ImageSource.FromFile ("flint.png"),
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.CenterAndExpand,
},
},
};
}
}
Thanks !