Moderui and ListView

Aug 19, 2015 at 8:33 PM
I have implemented the base modernui project without navigation, added breeze.sharp to project and have created a client side model of the breeze entities.. I can create a listview and add to xaml.
<mui:ModernWindow x:Class="ModernBreezeSharp.MainWindow"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:mui="http://firstfloorsoftware.com/ModernUI"
                  Title="mui" 
                  LogoData="F1 M 24.9015,43.0378L 25.0963,43.4298C 26.1685,49.5853 31.5377,54.2651 38,54.2651C 44.4623,54.2651 49.8315,49.5854 50.9037,43.4299L 51.0985,43.0379C 51.0985,40.7643 52.6921,39.2955 54.9656,39.2955C 56.9428,39.2955 58.1863,41.1792 58.5833,43.0379C 57.6384,52.7654 47.9756,61.75 38,61.75C 28.0244,61.75 18.3616,52.7654 17.4167,43.0378C 17.8137,41.1792 19.0572,39.2954 21.0344,39.2954C 23.3079,39.2954 24.9015,40.7643 24.9015,43.0378 Z M 26.7727,20.5833C 29.8731,20.5833 32.3864,23.0966 32.3864,26.197C 32.3864,29.2973 29.8731,31.8106 26.7727,31.8106C 23.6724,31.8106 21.1591,29.2973 21.1591,26.197C 21.1591,23.0966 23.6724,20.5833 26.7727,20.5833 Z M 49.2273,20.5833C 52.3276,20.5833 54.8409,23.0966 54.8409,26.197C 54.8409,29.2973 52.3276,31.8106 49.2273,31.8106C 46.127,31.8106 43.6136,29.2973 43.6136,26.197C 43.6136,23.0966 46.127,20.5833 49.2273,20.5833 Z"
                  Style="{StaticResource BlankWindow}">
    <ScrollViewer>
        <StackPanel>
            <TextBlock Text="MODERN UI FOR WPF" Style="{StaticResource Heading2}" />
            <ListView ItemsSource="{Binding Genres}" DisplayMemberPath="GenreTitle"  />
        </StackPanel>
    </ScrollViewer>
</mui:ModernWindow>
On rendering it appears as though the display member path is being ignored. so what I get back is just an object string. ie listview populates with 4 genres which is expected but instead of seeing the genre title what i see is 'webapplication6.models.genre' so its as if the displaymemberpath is altogether ignored. The same code works with a base wpf project. So Modernui seems to be setup in such a way that its not accepting a displaymemberpath attribute.

Is there a workaround for this?
Aug 20, 2015 at 4:53 PM
Edited Aug 20, 2015 at 4:53 PM
Seems to be the only away around it is to code the listview.view as a gridview which then correctly displays the data.
 <ListView x:Name="lvGenres" ItemsSource="{Binding Genres}" SelectionChanged="ListView_SelectionChanged">
          <ListView.View>
                      <GridView>
                            <GridViewColumn x:Name="GenreCol"  DisplayMemberBinding="{Binding Path=GenreTitle}" Width="175" />
                            
                        </GridView>
          </ListView.View>
 </ListView>