|
|
|
<windowing:AppWindow xmlns="https://github.com/avaloniaui"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:vm="using:StabilityMatrix.Avalonia.ViewModels"
|
|
|
|
xmlns:views="using:StabilityMatrix.Avalonia.Views"
|
|
|
|
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:windowing="clr-namespace:FluentAvalonia.UI.Windowing;assembly=FluentAvalonia"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
x:CompileBindings="True"
|
|
|
|
x:Class="StabilityMatrix.Avalonia.Views.MainWindow"
|
|
|
|
x:DataType="vm:MainWindowViewModel"
|
|
|
|
Icon="/Assets/Icon.ico"
|
|
|
|
Title="StabilityMatrix.Avalonia">
|
|
|
|
|
|
|
|
<Design.DataContext>
|
|
|
|
<vm:MainWindowViewModel />
|
|
|
|
</Design.DataContext>
|
|
|
|
|
|
|
|
<Grid RowDefinitions="Auto,Auto,*">
|
|
|
|
<Grid Name="TitleBarHost"
|
|
|
|
ColumnDefinitions="Auto,Auto,*,Auto"
|
|
|
|
Height="32"
|
|
|
|
Background="Transparent">
|
|
|
|
<Image Margin="12 4"
|
|
|
|
IsHitTestVisible="False"
|
|
|
|
Source="/Assets/Icon.ico"
|
|
|
|
Width="18" Height="18"
|
|
|
|
DockPanel.Dock="Left"
|
|
|
|
Name="WindowIcon"
|
|
|
|
RenderOptions.BitmapInterpolationMode="HighQuality">
|
|
|
|
<Image.IsVisible>
|
|
|
|
<OnPlatform Default="False">
|
|
|
|
<On Options="Windows" Content="True" />
|
|
|
|
</OnPlatform>
|
|
|
|
</Image.IsVisible>
|
|
|
|
</Image>
|
|
|
|
|
|
|
|
<TextBlock
|
|
|
|
Text="{Binding Title,
|
|
|
|
RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}"
|
|
|
|
FontSize="12"
|
|
|
|
IsHitTestVisible="False"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Grid.Column="1">
|
|
|
|
<TextBlock.IsVisible>
|
|
|
|
<OnPlatform Default="False">
|
|
|
|
<On Options="Windows" Content="True" />
|
|
|
|
</OnPlatform>
|
|
|
|
</TextBlock.IsVisible>
|
|
|
|
</TextBlock>
|
|
|
|
<Border Grid.Column="2" Padding="6" />
|
|
|
|
</Grid>
|
|
|
|
<ui:NavigationView
|
|
|
|
Grid.Row="1"
|
|
|
|
Grid.RowSpan="2"
|
|
|
|
AlwaysShowHeader="False"
|
|
|
|
PaneDisplayMode="Left"
|
|
|
|
Content="{Binding CurrentPage}"
|
|
|
|
MenuItemsSource="{Binding Pages, Mode=OneWay}"
|
|
|
|
SelectedItem="{Binding SelectedCategory}"
|
|
|
|
IsSettingsVisible="True"
|
|
|
|
IsBackEnabled="True">
|
|
|
|
|
|
|
|
<ui:NavigationView.MenuItemTemplate>
|
|
|
|
<DataTemplate DataType="{x:Type vm:PageViewModelBase}">
|
|
|
|
<ui:NavigationViewItem
|
|
|
|
Tag="LaunchPageView"
|
|
|
|
Margin="4,0,0,0"
|
|
|
|
Content="{Binding Title}"
|
|
|
|
IconSource="{Binding Icon}"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</ui:NavigationView.MenuItemTemplate>
|
|
|
|
<ui:NavigationView.DataTemplates>
|
|
|
|
<!-- Define your DataTemplates here, could also use ContentTemplate if only 1 template is needed -->
|
|
|
|
</ui:NavigationView.DataTemplates>
|
|
|
|
</ui:NavigationView>
|
|
|
|
</Grid>
|
|
|
|
</windowing:AppWindow>
|