Raul Figueira
Raul Figueira

Reputation: 73

Access Title Property in ContentPage from XAML - Xamarin.Forms

I've created a Xamarin.Forms project and then I've added a "Forms Xaml Page" called Main.xaml. After that I've tried to choose a Title to the ContentPage. But I cannot find the Title property in ContentPage. Visual Studio 2015 doesn't show this option to me (see picture bellow):

Where's the Title property in ContentPage?

Also, I've put a StackLayout inside the ContentPage, but I cannot put a Button inside this StackLayout. I can put the Button inside the ContentPage, but not inside the StackLayout. Why that happens (see picture bellow)?

Why is not possible to find a Button inside the StackLayout?

I think I can access Title from codebehind, but not from XAML.

Upvotes: 0

Views: 350

Answers (1)

deczaloth
deczaloth

Reputation: 7455

This worked for me (answer from jonalza):

"Right click on XAML file -> click on "Open with..." option -> Select "XAML Desinger" in the list -> click on "Set as Default" button" enter link description here

EDIT: As in your picture your line: <?xml version="1.0" encoding="utf-8" ?> appears in red and blue, and not only in blue, as usual, also check the answer from Brendan Zagaeski...

Upvotes: 0

Related Questions