|
1 | | -<Window xmlns="https://github.com/avaloniaui" |
| 1 | +<Window xmlns="https://github.com/avaloniaui" |
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
3 | 3 | xmlns:vm="using:GeneralUpdate.Tools.ViewModels" |
4 | 4 | x:Class="GeneralUpdate.Tools.Views.MainWindow" |
| 5 | + x:Name="MainWin" |
5 | 6 | x:DataType="vm:MainWindowViewModel" |
6 | | - Title="GeneralUpdate Tools v12" Width="960" Height="640" MinWidth="780" MinHeight="540" |
| 7 | + Title="GeneralUpdate Tools" Width="960" Height="640" MinWidth="780" MinHeight="540" |
7 | 8 | WindowStartupLocation="CenterScreen"> |
8 | 9 | <DockPanel> |
9 | 10 | <Border DockPanel.Dock="Left" Width="200" Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}"> |
10 | 11 | <Grid RowDefinitions="Auto,*"> |
11 | 12 | <Border Grid.Row="0" Padding="18,20,18,12"> |
12 | 13 | <TextBlock Text="GeneralUpdate Tools" FontSize="16" FontWeight="Bold"/> |
13 | 14 | </Border> |
14 | | - <ListBox Grid.Row="1" ItemsSource="{Binding NavItems}" Background="Transparent" BorderThickness="0"> |
15 | | - <ListBox.ItemTemplate> |
| 15 | + <ItemsControl Grid.Row="1" ItemsSource="{Binding NavItems}"> |
| 16 | + <ItemsControl.ItemTemplate> |
16 | 17 | <DataTemplate x:DataType="vm:NavItem"> |
17 | | - <Border Padding="18,10" Background="Transparent" CornerRadius="0,8,8,0"> |
18 | | - <TextBlock Text="{Binding Title}" FontSize="13"/> |
19 | | - </Border> |
| 18 | + <Button Content="{Binding Title}" |
| 19 | + Command="{Binding ElementName=MainWin, Path=DataContext.NavigateCommand}" |
| 20 | + CommandParameter="{Binding}" |
| 21 | + HorizontalAlignment="Stretch" |
| 22 | + HorizontalContentAlignment="Left" |
| 23 | + Padding="18,10" |
| 24 | + Margin="0" |
| 25 | + Background="Transparent" |
| 26 | + BorderThickness="0" |
| 27 | + FontSize="13"/> |
20 | 28 | </DataTemplate> |
21 | | - </ListBox.ItemTemplate> |
22 | | - </ListBox> |
| 29 | + </ItemsControl.ItemTemplate> |
| 30 | + </ItemsControl> |
23 | 31 | </Grid> |
24 | 32 | </Border> |
25 | 33 | <ContentControl Content="{Binding CurrentPage}"/> |
|
0 commit comments