StyletTestingGround/DynamicMenu/Pages/MainMenuView.xaml

34 lines
1.6 KiB
XML

<UserControl x:Class="DynamicMenu.Pages.MainMenuView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:local="clr-namespace:DynamicMenu.Pages"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance local:MainMenuViewModel}"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Vertical" Margin="5">
<TextBlock Text="COMPANY NAME" FontSize="20" FontWeight="Bold" HorizontalAlignment="Center" />
<TextBlock Text="App Name" FontSize="12" HorizontalAlignment="Center" />
</StackPanel>
<ItemsControl Grid.Row="1" ItemsSource="{Binding MenuItems}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20,5">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Content="{Binding Title}" Width="200" Height="120" Margin="5" />
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</Grid>
</UserControl>