1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Artemis/src/Artemis.UI/Screens/RootView.xaml
SpoinkyNL 3ec90766aa UI - Implemented tray icon
UI - Moved dialog service to the shared UI project
UI - Implemented autorun
2020-02-23 12:37:30 +01:00

68 lines
4.0 KiB
XML

<mde:MaterialWindow x:Class="Artemis.UI.Screens.RootView"
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:screens="clr-namespace:Artemis.UI.Screens"
xmlns:mde="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
xmlns:tb="http://www.hardcodet.net/taskbar"
mc:Ignorable="d"
FadeContentIfInactive="False"
Icon="/Artemis.UI;component/Resources/logo-512.png"
Title="Artemis"
TitleBarIcon="{StaticResource BowIcon}"
Foreground="{DynamicResource MaterialDesignBody}"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
UseLayoutRounding="True"
Deactivated="{s:Action WindowDeactivated}"
Activated="{s:Action WindowActivated}"
KeyDown="{s:Action WindowKeyDown}"
KeyUp="{s:Action WindowKeyUp}"
d:DesignHeight="640"
d:DesignWidth="1200"
d:DataContext="{d:DesignInstance screens:RootViewModel}">
<mde:MaterialWindow.Resources>
<Style TargetType="ContentControl" x:Key="InitializingFade">
<Style.Triggers>
<DataTrigger Binding="{Binding ActiveItemReady}" Value="False">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="1.0" To="0.0" Duration="0:0:0.4">
<DoubleAnimation.EasingFunction>
<QuadraticEase EasingMode="EaseInOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.0" To="1.0" Duration="0:0:0.4" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</mde:MaterialWindow.Resources>
<materialDesign:DialogHost Identifier="RootDialog">
<materialDesign:DrawerHost IsLeftDrawerOpen="{Binding IsSidebarVisible}">
<materialDesign:DrawerHost.LeftDrawerContent>
<ContentControl s:View.Model="{Binding SidebarViewModel}" Width="220" ClipToBounds="False" />
</materialDesign:DrawerHost.LeftDrawerContent>
<DockPanel>
<mde:AppBar Type="Dense"
IsNavigationDrawerOpen="{Binding IsSidebarVisible, Mode=TwoWay}"
Title="{Binding ActiveItem.DisplayName}"
ShowNavigationDrawerButton="True"
DockPanel.Dock="Top" />
<ContentControl s:View.Model="{Binding ActiveItem}" Style="{StaticResource InitializingFade}" />
</DockPanel>
</materialDesign:DrawerHost>
</materialDesign:DialogHost>
</mde:MaterialWindow>