View not displayed on tabbedpage
See original GitHub issueI’m creating application based on features example. I copied conductor view and view model and tab page view and view model to my application. Title is displayed but content no. InitializeComponent from tab page is called (twice per tab?!). I changed datatemplate to using ContetnView but this not helps at all. I’m using caliburn micro v3.0.3 with Xamarin Forms v2.3.4.231. Any sugestion why content of tabpage is not displaying?
Even this is not working (strange)
<Grid> <ContentView cal:View.Model="{Binding Payments}"></ContentView> </Grid>
PaymentsView is not inserted as content. I see only blank page.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
TabbedPage and Content pages are not showing
I have 2 tabbedpage children (Home and Add Location) I want the Home page to be the default page, although even the TabbedPage...
Read more >NavigationBar not visible on TabbedPage · Issue #670
Hi. I am trying to follow the docs on Multi-page applications and Navigation in order to implement the same view as the C#...
Read more >TabbedPage is not working for me - Microsoft Q&A
Hi, I am following a tutorial where I create a tabbed page: <TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" ...
Read more >Working with TabbedPages
When navigating to a TabbedPage, by default the selected tab displayed will always be the first Tab defined for the TabbedPage. In Prism,...
Read more >Automatic tracking of in-page links not working with tabbed ...
I recently discovered that Webflow can track 'current' secondary navigation to in-page links via href and anchor tags automatically, but, it ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the repository, managed to track the issue down.
TabView
is inheriting fromContentPage
which unlike the other xaml platforms doesn’t inherit fromContentView
so can’t used interchangeably likePage
andUserControl
can be in say UWP.Switching
TabView
toContentView
in both the.xaml
and.xaml.cs
has it load correctly.Whenever you see something like the xaml below you can imagine that Caliburn.Micro is examining the type of the
Payments
property on the view model and determining the correct view for that view model.For examples sake we’ll say the type of
Payments
isPaymentsListViewModel
, the view by convention would bePaymentsListView.
Caliburn.Micro is then going to instantiate an instance of that view, bind it to the
Payments
property and insert this new view into theContentView
above.Now if you look at the
Content
property onContentView
you’ll see it’s of the typeXamarin.Forms.View
. This means trying to insert a view that doesn’t indirectly inherit fromXamarin.Forms.View
will result in an error.What you’ll notice is that all the
*Page
types in Xamarin.Forms inherit fromPage
and notView
(XF is special here, in the other xaml stacks you’ll seePage
typeically inheritView
so the can often be used interchangably).What this means that if your
ProductsListView
is aPage
and not aView
you won’t see the view. Switching the root element in the xaml corrects the issues.