Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Problem extending Page, and all of its variants

$
0
0

I'm not sure why you have so many Page types. E.g.:

  1. It is more than likely you need to navigate to another page from all Page types. if this was so, i.e. all page types allowed navigation (had the built in support for navigation), then you don't need the Navigate Page. Navigation support could just be a part of the base Page.

  2. Most of the other pages it just seems their layout is different. E.g., you should have a Carousel layout, not a Carousel page.

  3. All pages should have a Content which can be set to any layout the developer wanted.

  4. MasterDetail page, again, it could easily just be another layout.

  5. Tabbed page again is just another layout. Except maybe on Android where the tabs can be part of the ActionBar. But surely Xamarin.Forms shouldn't be platform specific.

The main reason I would like one single Page type is I'm trying to extend it and add some common functionality I need for my app. This is difficult to do when there are so many different Page types, or I potentially need to repeat it 5 times.

I realize that the navigate page also has the ActionBar for Android apps, but having the ActionBar as part of the Navigate page (only) adds complexity to the design of the base class library, and thus the use of it. Think of Occam's razor - it would be better to have a simple page which could be composed of other components the developer could just add if they were needed for a given design. Currently the Navigate page is doing too much - navigation support, ActionBar support, etc.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>