4 Replies - 1191 Views - Last Post: 29 September 2017 - 10:05 PM

#1 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Xaml, TabbedPage acting weird

Posted 27 September 2017 - 08:50 PM

I am in the process of making a tabbed page but with Android I get this weird I guess bug. If I use this code:

<NavigationPage Title="Schedule" Icon="Start.png">
<x:Arguments>
<local:StartPage />
</x:Arguments>
</NavigationPage>

Then this is what my application looks like:

Posted Image

Why is there a double bar? Also if I use this code:

<local:TasksPage />

Then I don't get that above issue. Why is this?

This post has been edited by Dialupp: 27 September 2017 - 09:15 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Xaml, TabbedPage acting weird

#2 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6508
  • View blog
  • Posts: 14,375
  • Joined: 02-June 10

Re: Xaml, TabbedPage acting weird

Posted 29 September 2017 - 09:07 AM

You might want to edit the question title to include "Xamarin" - otherwise there's no hint to the platform you're using.
Was This Post Helpful? 0
  • +
  • -

#3 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Re: Xaml, TabbedPage acting weird

Posted 29 September 2017 - 09:51 AM

Ok but why is this happening? Also I can't edit the post for some reason.

This post has been edited by Dialupp: 29 September 2017 - 09:56 AM

Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6508
  • View blog
  • Posts: 14,375
  • Joined: 02-June 10

Re: Xaml, TabbedPage acting weird

Posted 29 September 2017 - 04:59 PM

No telling from 4 lines of XAML, most of which point at other views, and a postage stamp of a screen shot.

The syntax is also odd... I've never seen anyone define a NavigationPage like that. Is very atypical. Normally you make a ContentPage then say your NavigationPage is a new NavigationPage of that type (wrapping your ContentPage in the C# of the platform project.

MainPage = new NavigationPage(new MyCoolContentPage());

What you have is effectively the same that.. You're doing the XAML equivalent of new NavigationPage(new StarPage())
So while it is syntactically legal... I have misgivings about the order of events. The C# has to initialize first, then you have the generated C# that was based on the XAML {...} I'm not saying its wrong. I'm just saying it not normal and I don't know what kind of odd side-effects it could have. Such as the one you are asking about.
Was This Post Helpful? 0
  • +
  • -

#5 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Re: Xaml, TabbedPage acting weird

Posted 29 September 2017 - 10:05 PM

Ah ok thanks. Reason I only included those lines because its the only ones necessary, everything else is default.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1