Wrong project & problematic pages template issue in VS2017

FrankieFooFrankieFoo MYUniversity ✭✭
edited March 2017 in Xamarin.Forms

EDIT: Bug submitted

Not sure if this is the right avenue to raise these issue, but ...

  • When I try to generate a XF with X-Plat & PCL, The 'Master-Details' project template is generating a TabbedPage based project, and not a single MasterDetailPage in sight.

  • If we add a MasterDetailPage XAML to a folder (e.g. 'Pages') within a blank app , which will generate 4 files ( HostPage.xaml, HostPageDetail.xaml, HostPageMaster.xaml, HostPageMenuItems.xaml), the stuff doesn't work out of the box because:

    • The namespace in the myname.xaml is wrong by including the folder name as part of the assembly path: xmlns:pages="clr-namespace:MyApp.Pages; assembly=MyApp.Pages
    • The generated class def in *.xaml is x:Class="MyApp.Pages.HostPage", but it mismatched with the code-behind *.xaml.cs, which the namespace is defaulted to namespace MyApp.Pages.HostPage
    • In the HostPageMaster.xaml.cs, a ViewModel is included but with a mismatched variable (MenuItems vs HostPageMenuItems) class HostPageMasterViewModel : INotifyPropertyChanged { public ObservableCollection<HostPageMenuItem> MenuItems { get; } public HostPageMasterViewModel() { HostPageMenuItems = new ObservableCollection<HostPageMenuItem>(new[]

    • Once those has been resolved, the project can be compiled and run.

I'm running on

  • VS 2017 Enterprise 15.0.0-RTW+26228.4
  • Xamarin 4.3.0.784

Hopefully someone would be able to pick up this and feedback to engineering team.

Posts

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Did you use the VS17 feedback feature to give them a bug report?
    Much more sure than posting here and hoping someone takes a glace.
    I've been posting bug after bug through the feedback system for the last hour.
    I wish I could say I was surprised.

  • PierceBogganPierceBoggan USForum Administrator, Xamarin Team, Developer Group Leader Xamurai
    edited June 2017

    @FrankieFoo Thanks for the report! Yes, the master-detail template is a bit a misnomer in terms of Xamarin.Forms. Both iOS and Android have a concept of a 'master-detail' navigation flow. In this flow, you have a list of items that then shows a detail screen when an item in the list is tapped. In other words, this template was originally named in this fashion because that's what a native iOS or Android developer would refer to it as.

    However, as this can cause confusion with Xamarin.Forms developers, we will be splitting up the "Master Detail" template into three sub-templates in a future release that will better reflect the content of the template:

    • ListView - A list of data with a detail screen.
    • Tabbed - The current "Master Detail" template, or ListView + tabbed.
    • Flyout - Uses a MasterDetailPage instead of a TabbedPage, or ListView + a flyout.
  • SokooSokoo USMember ✭✭

    @PierceBoggan said:
    @FrankieFoo Thanks for the report! Yes, the master-detail template is a bit a misnomer in terms of Xamarin.Forms. Both iOS and Android have a concept of a 'master-detail' navigation flow. In this flow, you have a list of items that then shows a detail screen when an item in the list is tapped. In other words, this template was originally named in this fashion because that's what a native iOS or Android developer would refer to it as.

    However, as this can cause confusion with Xamarin.Forms developers, we will be splitting up the "Master Detail" template into three sub-templates in a future release that will better reflect the content of the template:

    • ListView - A list of data with a detail screen.
    • Tabbed - The current "Master Detail" template, or ListView + tabbed.
    • Flyout - Uses a MasterDetailPage instead of a TabbedPage, or ListView + a flyout.

    And yet it still creates a TabbedPage and is called Master Detail in the new project window? Why?

Sign In or Register to comment.