Ich versuche, eine NavigationViewMenu zu machen und ich brauche ein Menü legte alsWie mischt man dynamische und statische Elemente in UWP XAML NavigationView MenuItems?
statische Kopf
dynamische Elemente aus DB als Elemente
statische Startseite Artikel folgt
statische Kopfzeile
statisch Satz von Artikel
Das ist, was ich versucht: `
<NavigationViewItemSeparator />
<NavigationViewItemHeader Content="My Stuff">
<NavigationViewItemHeader.Foreground>
<SolidColorBrush Color="{ThemeResource SystemBaseHighColor}"></SolidColorBrush>
</NavigationViewItemHeader.Foreground>
</NavigationViewItemHeader>
<NavigationViewList ItemsSource="{x:Bind MyStuff}">
<NavigationViewList.ItemTemplate>
<DataTemplate x:DataType="local:MyModel">
<NavigationViewItem Icon="Pictures" Content="{x:Bind Name }" Tag="{x:Bind Tag }" />
</DataTemplate>
</NavigationViewList.ItemTemplate>
</NavigationViewList>
<!--<NavigationViewItem Icon="Pictures" Content="Woop" Tag="foos"/>
<NavigationViewItem Icon="Pictures" Content="Doop" Tag="foos"/>
<NavigationViewItem Icon="Pictures" Content="Loop" Tag="foos"/>-->
<NavigationViewItemHeader Content="Other Stuff">
<NavigationViewItemHeader.Foreground>
<SolidColorBrush Color="{ThemeResource SystemBaseHighColor}"></SolidColorBrush>
</NavigationViewItemHeader.Foreground>
</NavigationViewItemHeader>
<NavigationViewItem Icon="Pictures" Content="Foos" Tag="foos"/>
<NavigationViewItem Icon="ContactInfo" Content="Bars" Tag="bars"/>
<NavigationViewItem Icon="SwitchApps" Content="Bazes" Tag="bazes"/>
<NavigationViewItem Icon="SelectAll" Content="Kazes" Tag="kaz"/>
<NavigationViewItem Icon="Shuffle" Content="Dases" Tag="das"/>
</NavigationView.MenuItems>
` Das ist, was ich habe:
Dies ist, was ich gesucht:
Gibt es etwas so gutes und praktisches wie Angulars *ngFor
in XAML für UWP?
Funktioniert nur ein einzelnes Element in MyStuff arbeiten? Wird eine Höhe in der NavigationListView hart codiert, um sie korrekt anzuzeigen? –