Files
VDownload/VDownload.Core/VDownload.Core.Views/BaseWindow.xaml

68 lines
3.1 KiB
Plaintext
Raw Normal View History

2024-02-13 02:59:40 +01:00
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="VDownload.Core.Views.BaseWindow"
2024-02-13 02:59:40 +01:00
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="using:Microsoft.Xaml.Interactivity"
2024-02-13 02:59:40 +01:00
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
2024-02-28 01:22:13 +01:00
xmlns:cb="using:SimpleToolkit.UI.WinUI.Behaviors"
2024-02-13 02:59:40 +01:00
mc:Ignorable="d">
<Window.SystemBackdrop>
<MicaBackdrop Kind="Base"/>
</Window.SystemBackdrop>
<Grid x:Name="Root"
Loaded="Root_Loaded">
2024-02-13 02:59:40 +01:00
<Border x:Name="AppTitleBar"
IsHitTestVisible="True"
VerticalAlignment="Top"
Height="40"
Canvas.ZIndex="1"
Margin="55,4,0,0">
<StackPanel Orientation="Horizontal">
<Image HorizontalAlignment="Left"
2024-02-13 02:59:40 +01:00
VerticalAlignment="Center"
Source="{StaticResource ImageLogo}"
Width="16"
Height="16"/>
<TextBlock Text="VDownload"
2024-02-13 02:59:40 +01:00
VerticalAlignment="Center"
Margin="12, 0, 0, 0"
Style="{StaticResource CaptionTextBlockStyle}"/>
2024-02-13 02:59:40 +01:00
</StackPanel>
</Border>
<NavigationView IsTitleBarAutoPaddingEnabled="True"
2024-02-13 02:59:40 +01:00
IsBackButtonVisible="Collapsed"
PaneDisplayMode="LeftCompact"
Canvas.ZIndex="0"
MenuItemsSource="{Binding Items}"
FooterMenuItemsSource="{Binding FooterItems}"
SelectedItem="{Binding SelectedItem}"
Background="Transparent">
2024-02-13 02:59:40 +01:00
<i:Interaction.Behaviors>
<cb:EventToCommandBehavior Command="{Binding NavigateCommand}"
Event="ItemInvoked"
PassArguments="True"/>
2024-02-13 02:59:40 +01:00
</i:Interaction.Behaviors>
<NavigationView.Resources>
<SolidColorBrush x:Key="NavigationViewContentBackground"
Color="Transparent"/>
</NavigationView.Resources>
<NavigationView.MenuItemTemplate>
<DataTemplate>
<NavigationViewItem Content="{Binding Name}" Tag="{Binding}">
<NavigationViewItem.Icon>
<ImageIcon Source="{Binding IconSource}"/>
</NavigationViewItem.Icon>
</NavigationViewItem>
</DataTemplate>
</NavigationView.MenuItemTemplate>
<Frame Margin="0,48,0,0"
CornerRadius="10"
Content="{Binding CurrentViewModel, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource ViewModelToViewConverter}}">
</Frame>
</NavigationView>
</Grid>
</Window>