-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
45 lines (42 loc) · 1.5 KB
/
Copy pathMainWindow.xaml
File metadata and controls
45 lines (42 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0" encoding="utf-8" ?>
<Window
x:Class="WinUIMath.Example.MainWindow"
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:local="using:WinUIMath.Example"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="using:WinUIMath.Example.Views"
xmlns:vm="using:WinUIMath.Example.ViewModels"
Title="WinUIMath.Example"
mc:Ignorable="d">
<Window.SystemBackdrop>
<MicaBackdrop />
</Window.SystemBackdrop>
<NavigationView
ActualThemeChanged="OnActualThemeChanged"
Loaded="OnLoaded"
IsBackButtonVisible="Collapsed"
IsBackEnabled="False"
IsSettingsVisible="False"
MenuItemsSource="{x:Bind ViewModel.Presets}"
SelectedItem="{x:Bind ViewModel.SelectedPreset, Mode=TwoWay}"
SelectionChanged="OnSelectionChanged">
<NavigationView.MenuItemTemplate>
<DataTemplate x:DataType="vm:PresetViewModel">
<NavigationViewItem Icon="Placeholder" ToolTipService.ToolTip="{x:Bind Formula}">
<StackPanel Margin="8" Spacing="2">
<TextBlock Text="{x:Bind Name}" />
<TextBlock
MaxLines="1"
Opacity="0.5"
Text="{x:Bind Formula}"
TextTrimming="CharacterEllipsis"
TextWrapping="NoWrap" />
</StackPanel>
</NavigationViewItem>
</DataTemplate>
</NavigationView.MenuItemTemplate>
<views:FormulaPresetView x:Name="PART_FormulaPresetView" />
</NavigationView>
</Window>