Common.GUI templates and styles
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<appSettings>
|
||||
|
||||
</appSettings>
|
||||
</configuration>
|
||||
@@ -1,9 +1,19 @@
|
||||
<Application x:Class="Common.GUI.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:VM="clr-namespace:Common.GUI.ViewModels"
|
||||
Startup="Application_Startup">
|
||||
xmlns:M="clr-namespace:Common.GUI.Models"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<VM:VMLocator x:Key="VMLocator" />
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Theme/Colors.light.xaml" />
|
||||
<ResourceDictionary Source="Theme/ScrollViewer.xaml" />
|
||||
<ResourceDictionary Source="Theme/Icons.xaml" />
|
||||
<ResourceDictionary Source="Theme/Styles.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<M:Services x:Key="Services" />
|
||||
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
||||
@@ -1,34 +1,120 @@
|
||||
namespace Common.GUI
|
||||
{
|
||||
using Common.GUI.Models;
|
||||
using Common.GUI.Models.Base;
|
||||
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
public partial class App : Application
|
||||
{
|
||||
private void Application_Startup(object sender, StartupEventArgs args)
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
var args = e.Args ?? Array.Empty<string>();
|
||||
|
||||
if (!User32DllImports.ShowRunningInstance())
|
||||
{
|
||||
var mainWindow = new MainWindow();
|
||||
this.MainWindow = mainWindow;
|
||||
this.MainWindow.Show();
|
||||
this.NavigateToPage(args, mainWindow);
|
||||
Services.GetService<Arguments>()
|
||||
.Reset();
|
||||
Debug.WriteLine(string.Join(" ", args));
|
||||
Console.WriteLine(string.Join(" ", args));
|
||||
|
||||
PickTheme();
|
||||
PickPage(string.Join(" ", args));
|
||||
}
|
||||
}
|
||||
|
||||
private void NavigateToPage(StartupEventArgs args, MainWindow mainWindow)
|
||||
private void PickPage(string args)
|
||||
{
|
||||
var argsLine = string.Join(" ", args.Args ?? Array.Empty<string>());
|
||||
var pageMatch = Regex.Match(argsLine, "--page\\s*(?<page>[a-zA-Z0-9]+)");
|
||||
|
||||
if (pageMatch.Success)
|
||||
if (string.IsNullOrWhiteSpace(args))
|
||||
{
|
||||
var page = $"Pages/{pageMatch.Groups["page"].Value}.xaml";
|
||||
mainWindow.Source = new Uri(page, UriKind.Relative);
|
||||
return;
|
||||
}
|
||||
|
||||
var pageMatch = Regex.Match(args, @"-page\s*(?<page>[a-zA-Z0-9_]*)\s*((?=-)|)");
|
||||
|
||||
if (!pageMatch.Success)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var pageName = pageMatch.Groups["page"].Value;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(pageName))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var assembly = typeof(App).Assembly;
|
||||
var pageType = assembly
|
||||
.GetTypes()
|
||||
.FirstOrDefault(x => x.Name.Equals(pageName, StringComparison.InvariantCultureIgnoreCase));
|
||||
|
||||
if (pageType is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var assemblyNs = assembly.GetName().Name;
|
||||
pageName = pageType.Name;
|
||||
|
||||
if (pageType != null)
|
||||
{
|
||||
var ns = pageType
|
||||
.Namespace
|
||||
.Replace(assemblyNs, string.Empty)
|
||||
.Trim('.')
|
||||
.Replace('.', '/');
|
||||
pageName = $"{ns}/{pageName}.xaml";
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(pageName))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var argsMatch = Regex.Match(args, @"-args\s*(?<page>[a-zA-Z0-9_]*)\s*((?=-)|)");
|
||||
var arguments = $"{argsMatch?.Groups?["args"]?.Value}"
|
||||
.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(x => Convert.ChangeType(x, typeof(object)))
|
||||
.ToArray();
|
||||
|
||||
Services.GetService<Arguments>()
|
||||
.SetValues(arguments);
|
||||
|
||||
void Current_Navigated(object _, NavigationEventArgs _1)
|
||||
{
|
||||
if (Current.MainWindow is NavigationWindow navigationWindow)
|
||||
{
|
||||
navigationWindow.Navigate(new Uri(pageName, UriKind.Relative));
|
||||
}
|
||||
|
||||
Current.Navigated -= Current_Navigated;
|
||||
}
|
||||
|
||||
Current.Navigated += Current_Navigated;
|
||||
}
|
||||
|
||||
private static void PickTheme()
|
||||
{
|
||||
var dll = typeof(App).Assembly.Location;
|
||||
var configuration = ConfigurationManager.OpenExeConfiguration(dll);
|
||||
var settings = configuration.AppSettings.Settings;
|
||||
var theme = "light";
|
||||
|
||||
if (settings[nameof(theme)] != null)
|
||||
{
|
||||
theme = settings[nameof(theme)].Value;
|
||||
}
|
||||
|
||||
Current.Resources
|
||||
.MergedDictionaries[0]
|
||||
.Source = new Uri($"Theme/Colors.{theme}.xaml", UriKind.Relative);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,11 +75,16 @@
|
||||
<Compile Include="Controls\Eregister\EregisterFeaturesItemsControl.xaml.cs">
|
||||
<DependentUpon>EregisterFeaturesItemsControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Models\Base\Arguments.cs" />
|
||||
<Compile Include="Models\Pages\Eregister\ManualProgrammingModel.cs" />
|
||||
<Compile Include="Pages\ControlsPage.xaml.cs">
|
||||
<DependentUpon>ControlsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Eregister\ManualProgrammingPage.xaml.cs">
|
||||
<DependentUpon>ManualProgrammingPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModels\Base\MessageHandler.cs" />
|
||||
<Compile Include="ViewModels\Base\ArgsVM.cs" />
|
||||
<Compile Include="ViewModels\Base\ArgsVM[T].cs" />
|
||||
<Compile Include="Models\Base\User32DllImports.cs" />
|
||||
<Compile Include="Models\Base\WindowCommands.cs" />
|
||||
<Compile Include="Pages\TestPage.xaml.cs">
|
||||
@@ -88,7 +93,7 @@
|
||||
<Compile Include="ViewModels\Eregister\EregisterFeatureItemVM.cs" />
|
||||
<Compile Include="ViewModels\Eregister\EregisterManualProgrammingVM.cs" />
|
||||
<Compile Include="ViewModels\Eregister\FeatureDictionary.cs" />
|
||||
<Compile Include="ViewModels\VMLocator.cs" />
|
||||
<Compile Include="Models\Services.cs" />
|
||||
<Page Include="Controls\Eregister\EregisterFeaturesItemsControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -101,6 +106,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\ControlsPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Pages\Eregister\ManualProgrammingPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -119,10 +128,6 @@
|
||||
</Compile>
|
||||
<Compile Include="ViewModels\Base\Command.cs" />
|
||||
<Compile Include="ViewModels\Base\Command[T].cs" />
|
||||
<Compile Include="ViewModels\Controls\MessageVM.cs" />
|
||||
<Compile Include="ViewModels\Controls\MainLayoutVM.cs" />
|
||||
<Compile Include="ViewModels\Controls\MainMenuVM.cs" />
|
||||
<Compile Include="ViewModels\Pages\MainPageVM.cs" />
|
||||
<Compile Include="ViewModels\Base\VM.cs" />
|
||||
<Compile Include="ViewModels\Base\VM[T].cs" />
|
||||
<Compile Include="Controls\MainLayout.xaml.cs">
|
||||
@@ -142,6 +147,26 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Theme\Colors.dark.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Theme\Colors.light.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Theme\Icons.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Theme\ScrollViewer.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Theme\Styles.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
@@ -173,6 +198,8 @@
|
||||
<ItemGroup>
|
||||
<Folder Include="Models\Data\" />
|
||||
<Folder Include="Models\Http\" />
|
||||
<Folder Include="ViewModels\Controls\" />
|
||||
<Folder Include="ViewModels\Pages\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Hardware\WaterMeter\eRegister\Common.Hardware.WaterMeter.eRegister\Common.Hardware.WaterMeter.eRegister.csproj">
|
||||
|
||||
@@ -2,37 +2,11 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Controls="clr-namespace:Common.GUI.Controls"
|
||||
DataContext="{Binding MainLayoutVM, Source={StaticResource VMLocator}}">
|
||||
Background="{DynamicResource md_theme_background}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Controls:MainMenu Grid.Row="0" />
|
||||
<ItemsControl Grid.Row="1"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<!--<Border Background="Red"
|
||||
CornerRadius="4"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10"
|
||||
VerticalAlignment="Bottom">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect BlurRadius="5" RenderingBias="Quality" ShadowDepth="1" Color="Red" />
|
||||
</Border.Effect>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Content="Title" Foreground="WhiteSmoke" Grid.Row="0" />
|
||||
<Label Content="Message" Foreground="WhiteSmoke" Grid.Row="1" />
|
||||
</Grid>
|
||||
</Border>-->
|
||||
<Grid Grid.Row="1" />
|
||||
</Grid>
|
||||
|
||||
@@ -4,39 +4,39 @@
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Markup;
|
||||
|
||||
[ContentProperty(nameof(Content))]
|
||||
[ContentProperty(nameof(Body))]
|
||||
public partial class MainLayout : Grid
|
||||
{
|
||||
public static readonly DependencyProperty ContentProperty = DependencyProperty.Register(
|
||||
name: nameof(Content)
|
||||
, propertyType: typeof(Grid)
|
||||
, ownerType: typeof(MainLayout)
|
||||
, typeMetadata: new PropertyMetadata(default(Grid), ContentChanged));
|
||||
private static readonly DependencyProperty BodyProperty = DependencyProperty.Register(
|
||||
name: nameof(Body)
|
||||
, propertyType: typeof(Panel)
|
||||
, ownerType: typeof(MainLayout)
|
||||
, typeMetadata: new FrameworkPropertyMetadata(
|
||||
defaultValue: default(Panel)
|
||||
, propertyChangedCallback: BodyChanged));
|
||||
|
||||
public MainLayout() => this.InitializeComponent();
|
||||
|
||||
public Grid Content
|
||||
public Panel Body
|
||||
{
|
||||
get => this.GetValue(ContentProperty) as Grid;
|
||||
set => this.SetValue(ContentProperty, value);
|
||||
get => this.GetValue(BodyProperty) as Panel;
|
||||
set => this.SetValue(BodyProperty, value);
|
||||
}
|
||||
|
||||
private static void ContentChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)
|
||||
private static void BodyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)
|
||||
{
|
||||
if (dependencyObject is MainLayout mainLayout)
|
||||
{
|
||||
var children = mainLayout.Children;
|
||||
|
||||
if (args.OldValue is UIElement oldContent)
|
||||
if (args.OldValue is UIElement oldElement)
|
||||
{
|
||||
children.Remove(oldContent);
|
||||
mainLayout.Children.Remove(oldElement);
|
||||
}
|
||||
|
||||
if (args.NewValue is UIElement newContent)
|
||||
if (args.NewValue is UIElement newElement)
|
||||
{
|
||||
children.Insert(1, newContent);
|
||||
mainLayout.Children.Add(newElement);
|
||||
|
||||
Grid.SetRow(newContent, 1);
|
||||
Grid.SetRow(newElement, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,598 @@
|
||||
<Menu x:Class="Common.GUI.Controls.MainMenu"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
DataContext="{Binding MainMenuVM, Source={StaticResource VMLocator}}">
|
||||
<MenuItem Header="Main" Command="{Binding NavigateCommand}" CommandParameter="Pages/MainPage.xaml"/>
|
||||
<MenuItem Header="Test" Command="{Binding NavigateCommand}" CommandParameter="Pages/TestPage.xaml"/>
|
||||
<MenuItem Header="e-register">
|
||||
<MenuItem Header="Manual programming" Command="{Binding NavigateCommand}" CommandParameter="Pages/Eregister/ManualProgrammingPage.xaml" />
|
||||
Background="{DynamicResource primary}"
|
||||
BorderThickness="0">
|
||||
<Menu.Resources>
|
||||
<MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
|
||||
<Geometry x:Key="DownArrow">M 0,0 L 3.5,4 L 7,0 Z</Geometry>
|
||||
<Geometry x:Key="UpArrow">M 0,4 L 3.5,0 L 7,4 Z</Geometry>
|
||||
<Geometry x:Key="RightArrow">M 0,0 L 4,3.5 L 0,7 Z</Geometry>
|
||||
<Geometry x:Key="Checkmark">F1 M 10.0,1.2 L 4.7,9.1 L 4.5,9.1 L 0,5.2 L 1.3,3.5 L 4.3,6.1L 8.3,0 L 10.0,1.2 Z</Geometry>
|
||||
|
||||
<Style x:Key="MenuScrollButton" BasedOn="{x:Null}" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="ClickMode" Value="Hover"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border x:Name="templateRoot"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter HorizontalAlignment="Center"
|
||||
Margin="6"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="{ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}"
|
||||
TargetType="{x:Type ScrollViewer}"
|
||||
BasedOn="{x:Null}">
|
||||
<Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
|
||||
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid SnapsToDevicePixels="true">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Column="0" Grid.Row="1">
|
||||
<ScrollContentPresenter CanContentScroll="{TemplateBinding CanContentScroll}"
|
||||
Margin="{TemplateBinding Padding}"/>
|
||||
</Border>
|
||||
<RepeatButton Command="{x:Static ScrollBar.LineUpCommand}"
|
||||
CommandTarget="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
||||
Grid.Column="0"
|
||||
Focusable="false"
|
||||
Grid.Row="0"
|
||||
Style="{StaticResource MenuScrollButton}">
|
||||
<RepeatButton.Visibility>
|
||||
<MultiBinding ConverterParameter="0"
|
||||
Converter="{StaticResource MenuScrollingVisibilityConverter}"
|
||||
FallbackValue="Visibility.Collapsed">
|
||||
<Binding Path="ComputedVerticalScrollBarVisibility"
|
||||
RelativeSource="{RelativeSource Mode=TemplatedParent}"/>
|
||||
<Binding Path="VerticalOffset" RelativeSource="{RelativeSource Mode=TemplatedParent}"/>
|
||||
<Binding Path="ExtentHeight" RelativeSource="{RelativeSource Mode=TemplatedParent}"/>
|
||||
<Binding Path="ViewportHeight" RelativeSource="{RelativeSource Mode=TemplatedParent}"/>
|
||||
</MultiBinding>
|
||||
</RepeatButton.Visibility>
|
||||
<Path Data="{StaticResource UpArrow}"
|
||||
Fill="{DynamicResource onPrimary}"/>
|
||||
</RepeatButton>
|
||||
<RepeatButton Command="{x:Static ScrollBar.LineDownCommand}"
|
||||
CommandTarget="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
||||
Grid.Column="0"
|
||||
Focusable="false"
|
||||
Grid.Row="2"
|
||||
Style="{StaticResource MenuScrollButton}">
|
||||
<RepeatButton.Visibility>
|
||||
<MultiBinding ConverterParameter="100"
|
||||
Converter="{StaticResource MenuScrollingVisibilityConverter}"
|
||||
FallbackValue="Visibility.Collapsed">
|
||||
<Binding Path="ComputedVerticalScrollBarVisibility"
|
||||
RelativeSource="{RelativeSource Mode=TemplatedParent}"/>
|
||||
<Binding Path="VerticalOffset" RelativeSource="{RelativeSource Mode=TemplatedParent}"/>
|
||||
<Binding Path="ExtentHeight" RelativeSource="{RelativeSource Mode=TemplatedParent}"/>
|
||||
<Binding Path="ViewportHeight" RelativeSource="{RelativeSource Mode=TemplatedParent}"/>
|
||||
</MultiBinding>
|
||||
</RepeatButton.Visibility>
|
||||
<Path Data="{StaticResource DownArrow}"
|
||||
Fill="{DynamicResource onPrimary}"/>
|
||||
</RepeatButton>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<ControlTemplate x:Key="{ComponentResourceKey ResourceId=TopLevelItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}"
|
||||
TargetType="{x:Type MenuItem}">
|
||||
<Border x:Name="templateRoot"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
SnapsToDevicePixels="true">
|
||||
<Grid VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter x:Name="Icon"
|
||||
ContentSource="Icon"
|
||||
HorizontalAlignment="Center"
|
||||
Height="16"
|
||||
Margin="3"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="Center"
|
||||
Width="16"/>
|
||||
<Path x:Name="GlyphPanel"
|
||||
Data="{StaticResource Checkmark}"
|
||||
FlowDirection="LeftToRight"
|
||||
Fill="{DynamicResource onPrimary}"
|
||||
Margin="3"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Collapsed"/>
|
||||
<ContentPresenter ContentSource="Header"
|
||||
Grid.Column="1"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||
<Setter Property="Padding"
|
||||
TargetName="templateRoot"
|
||||
Value="10 0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
|
||||
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="TextElement.Foreground"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource md_theme_secondaryContainer}"/>
|
||||
<Setter Property="Fill"
|
||||
TargetName="GlyphPanel"
|
||||
Value="{DynamicResource md_theme_secondaryContainer}"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsHighlighted" Value="True"/>
|
||||
<Condition Property="IsEnabled" Value="False"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource primary}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource primary}"/>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="{ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}"
|
||||
TargetType="{x:Type MenuItem}">
|
||||
<Border x:Name="templateRoot"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Padding="10 0"
|
||||
SnapsToDevicePixels="true">
|
||||
<Grid VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter x:Name="Icon"
|
||||
ContentSource="Icon"
|
||||
HorizontalAlignment="Center"
|
||||
Height="16"
|
||||
Margin="3 10 3 10"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="Center"
|
||||
Width="16"/>
|
||||
<Path x:Name="GlyphPanel"
|
||||
Data="{StaticResource Checkmark}"
|
||||
FlowDirection="LeftToRight"
|
||||
Fill="{TemplateBinding Foreground}"
|
||||
Margin="3"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Collapsed"/>
|
||||
<ContentPresenter ContentSource="Header"
|
||||
Grid.Column="1"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
<Popup x:Name="PART_Popup"
|
||||
AllowsTransparency="true"
|
||||
Focusable="false"
|
||||
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
||||
Placement="Bottom"
|
||||
PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}"
|
||||
PlacementTarget="{Binding ElementName=templateRoot}">
|
||||
<Border x:Name="SubMenuBorder"
|
||||
Background="{DynamicResource primary}"
|
||||
BorderBrush="{DynamicResource primary}"
|
||||
BorderThickness="0"
|
||||
Padding="0">
|
||||
<ScrollViewer x:Name="SubMenuScrollViewer"
|
||||
Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer
|
||||
, TypeInTargetAssembly={x:Type FrameworkElement}}}">
|
||||
<Grid RenderOptions.ClearTypeHint="Enabled">
|
||||
<Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
||||
<Rectangle x:Name="OpaqueRect"
|
||||
Fill="{Binding Background, ElementName=SubMenuBorder}"
|
||||
Height="{Binding ActualHeight, ElementName=SubMenuBorder}"
|
||||
Width="{Binding ActualWidth, ElementName=SubMenuBorder}"/>
|
||||
</Canvas>
|
||||
<Rectangle Fill="{DynamicResource md_theme_secondaryContainer}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="29,2,0,2"
|
||||
Width="1"/>
|
||||
<ItemsPresenter x:Name="ItemsPresenter"
|
||||
KeyboardNavigation.DirectionalNavigation="Cycle"
|
||||
Grid.IsSharedSizeScope="true"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
KeyboardNavigation.TabNavigation="Cycle"/>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSuspendingPopupAnimation" Value="true">
|
||||
<Setter Property="PopupAnimation" TargetName="PART_Popup" Value="None"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||
<Setter Property="Margin"
|
||||
TargetName="templateRoot"
|
||||
Value="10 0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
|
||||
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="TextElement.Foreground"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource md_theme_secondaryContainer}"/>
|
||||
<Setter Property="Fill"
|
||||
TargetName="GlyphPanel"
|
||||
Value="{DynamicResource md_theme_secondaryContainer}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="SubMenuScrollViewer" Value="false">
|
||||
<Setter Property="Canvas.Top"
|
||||
TargetName="OpaqueRect"
|
||||
Value="{Binding VerticalOffset, ElementName=SubMenuScrollViewer}"/>
|
||||
<Setter Property="Canvas.Left"
|
||||
TargetName="OpaqueRect"
|
||||
Value="{Binding HorizontalOffset, ElementName=SubMenuScrollViewer}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}"
|
||||
TargetType="{x:Type MenuItem}">
|
||||
<Border x:Name="templateRoot"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Padding="10 4"
|
||||
SnapsToDevicePixels="true">
|
||||
<Grid Margin="-1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="22" SharedSizeGroup="MenuItemIconColumnGroup" Width="Auto"/>
|
||||
<ColumnDefinition Width="3"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="30"/>
|
||||
<ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto"/>
|
||||
<ColumnDefinition Width="20"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter x:Name="Icon"
|
||||
ContentSource="Icon"
|
||||
HorizontalAlignment="Center"
|
||||
Height="16"
|
||||
Margin="0"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="Center"
|
||||
Width="16"/>
|
||||
<Border x:Name="GlyphPanel"
|
||||
Background="{DynamicResource primary}"
|
||||
BorderBrush="{DynamicResource primary}"
|
||||
BorderThickness="0"
|
||||
ClipToBounds="False"
|
||||
HorizontalAlignment="Center"
|
||||
Height="22"
|
||||
Margin="-1,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Hidden"
|
||||
Width="22">
|
||||
<Path x:Name="Glyph"
|
||||
Data="{StaticResource Checkmark}"
|
||||
FlowDirection="LeftToRight"
|
||||
Fill="{DynamicResource onPrimary}"
|
||||
Height="11"
|
||||
Width="10"/>
|
||||
</Border>
|
||||
<ContentPresenter x:Name="menuHeaderContainer"
|
||||
ContentSource="Header"
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock x:Name="menuGestureText"
|
||||
Grid.Column="4"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
Opacity="0.7"
|
||||
Text="{TemplateBinding InputGestureText}"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
|
||||
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="TextElement.Foreground"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource md_theme_secondaryContainer}"/>
|
||||
<Setter Property="Fill"
|
||||
TargetName="Glyph"
|
||||
Value="{DynamicResource md_theme_secondaryContainer}"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsHighlighted" Value="True"/>
|
||||
<Condition Property="IsEnabled" Value="False"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource primary}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource primary}"/>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}"
|
||||
TargetType="{x:Type MenuItem}">
|
||||
<Border x:Name="templateRoot"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
SnapsToDevicePixels="true">
|
||||
<Grid Margin="-1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition SharedSizeGroup="MenuItemIconColumnGroup" Width="Auto"/>
|
||||
<ColumnDefinition Width="3"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="30"/>
|
||||
<ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter x:Name="Icon"
|
||||
ContentSource="Icon"
|
||||
HorizontalAlignment="Center"
|
||||
Height="16"
|
||||
Margin="3"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="Center"
|
||||
Width="16"/>
|
||||
<Border x:Name="GlyphPanel"
|
||||
Background="{DynamicResource primary}"
|
||||
BorderBrush="{DynamicResource primary}"
|
||||
BorderThickness="0"
|
||||
Height="22"
|
||||
Margin="-1,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Hidden"
|
||||
Width="22">
|
||||
<Path x:Name="Glyph"
|
||||
Data="{DynamicResource Checkmark}"
|
||||
FlowDirection="LeftToRight"
|
||||
Fill="{DynamicResource onPrimary}"
|
||||
Height="11"
|
||||
Width="9"/>
|
||||
</Border>
|
||||
<ContentPresenter ContentSource="Header"
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="4"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
Opacity="0.7"
|
||||
Text="{TemplateBinding InputGestureText}"
|
||||
VerticalAlignment="Center"/>
|
||||
<Path x:Name="RightArrow"
|
||||
Grid.Column="5"
|
||||
Data="{StaticResource RightArrow}"
|
||||
Fill="{DynamicResource onPrimary}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"/>
|
||||
<Popup x:Name="PART_Popup"
|
||||
AllowsTransparency="true"
|
||||
Focusable="false"
|
||||
HorizontalOffset="-2"
|
||||
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
||||
Placement="Right"
|
||||
PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}"
|
||||
VerticalOffset="-3">
|
||||
<Border x:Name="SubMenuBorder"
|
||||
Background="{DynamicResource primary}"
|
||||
BorderBrush="{DynamicResource primary}"
|
||||
BorderThickness="0"
|
||||
Padding="2">
|
||||
<ScrollViewer x:Name="SubMenuScrollViewer"
|
||||
Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer
|
||||
, TypeInTargetAssembly={x:Type FrameworkElement}}}">
|
||||
<Grid RenderOptions.ClearTypeHint="Enabled">
|
||||
<Canvas HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
|
||||
<Rectangle x:Name="OpaqueRect"
|
||||
Fill="{Binding Background, ElementName=SubMenuBorder}"
|
||||
Height="{Binding ActualHeight, ElementName=SubMenuBorder}"
|
||||
Width="{Binding ActualWidth, ElementName=SubMenuBorder}"/>
|
||||
</Canvas>
|
||||
<Rectangle Fill="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="29,2,0,2"
|
||||
Width="1"/>
|
||||
<ItemsPresenter x:Name="ItemsPresenter"
|
||||
KeyboardNavigation.DirectionalNavigation="Cycle"
|
||||
Grid.IsSharedSizeScope="true"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
KeyboardNavigation.TabNavigation="Cycle"/>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSuspendingPopupAnimation" Value="true">
|
||||
<Setter Property="PopupAnimation" TargetName="PART_Popup" Value="None"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Icon" Value="{x:Null}">
|
||||
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
|
||||
<Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsHighlighted" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="templateRoot" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="templateRoot" Value="{DynamicResource md_theme_primary}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="TextElement.Foreground"
|
||||
TargetName="templateRoot"
|
||||
Value="{DynamicResource md_theme_secondaryContainer}"/>
|
||||
<Setter Property="Fill"
|
||||
TargetName="Glyph"
|
||||
Value="{DynamicResource md_theme_secondaryContainer}"/>
|
||||
<Setter Property="Fill"
|
||||
TargetName="RightArrow"
|
||||
Value="{DynamicResource md_theme_secondaryContainer}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="ScrollViewer.CanContentScroll" SourceName="SubMenuScrollViewer" Value="false">
|
||||
<Setter Property="Canvas.Top"
|
||||
TargetName="OpaqueRect"
|
||||
Value="{Binding VerticalOffset, ElementName=SubMenuScrollViewer}"/>
|
||||
<Setter Property="Canvas.Left"
|
||||
TargetName="OpaqueRect"
|
||||
Value="{Binding HorizontalOffset, ElementName=SubMenuScrollViewer}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style x:Key="MenuItemStyle" TargetType="{x:Type MenuItem}">
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="HorizontalContentAlignment"
|
||||
Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
||||
<Setter Property="VerticalContentAlignment"
|
||||
Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource primary}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource primary}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="FontFamily" Value="Verdana" />
|
||||
<Setter Property="Template"
|
||||
Value="{DynamicResource {ComponentResourceKey ResourceId=SubmenuItemTemplateKey
|
||||
, TypeInTargetAssembly={x:Type MenuItem}}}"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Role" Value="TopLevelHeader">
|
||||
<Setter Property="Background" Value="{DynamicResource primary}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource primary}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource onPrimary}"/>
|
||||
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}"/>
|
||||
<Setter Property="Padding" Value="0 10"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Role" Value="TopLevelItem">
|
||||
<Setter Property="Background" Value="{DynamicResource primary}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource primary}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource onPrimary}"/>
|
||||
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=TopLevelItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}"/>
|
||||
<Setter Property="Padding" Value="0 10"/>
|
||||
</Trigger>
|
||||
<Trigger Property="Role" Value="SubmenuHeader">
|
||||
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Menu.Resources>
|
||||
<MenuItem Style="{DynamicResource MenuItemStyle}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource bi_home_fill}"
|
||||
Fill="{DynamicResource onPrimary}"
|
||||
Height="12"
|
||||
Stretch="Uniform"
|
||||
Width="12"/>
|
||||
</MenuItem.Icon>
|
||||
<MenuItem Click="MenuItem_Click_Navigate"
|
||||
CommandParameter="Pages/ControlsPage.xaml"
|
||||
Header="Controls"
|
||||
Style="{DynamicResource MenuItemStyle}" />
|
||||
<MenuItem Click="MenuItem_Click_LightMode"
|
||||
Header="Light mode"
|
||||
Style="{DynamicResource MenuItemStyle}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource bi_sun}"
|
||||
Fill="{DynamicResource onPrimary}"
|
||||
Height="13"
|
||||
Stretch="Uniform"
|
||||
Width="13"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Click="MenuItem_Click_DarkMode"
|
||||
Header="Dark mode"
|
||||
Style="{DynamicResource MenuItemStyle}">
|
||||
<MenuItem.Icon>
|
||||
<Path Data="{StaticResource bi_moon_stars}"
|
||||
Fill="{DynamicResource onPrimary}"
|
||||
Height="11"
|
||||
Stretch="Uniform"
|
||||
Width="11"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Eregister"
|
||||
Style="{StaticResource MenuItemStyle}" >
|
||||
<MenuItem Click="MenuItem_Click_Navigate"
|
||||
CommandParameter="Pages/Eregister/ManualProgrammingPage.xaml"
|
||||
Header="Manual Programming"
|
||||
Style="{StaticResource MenuItemStyle}" />
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
|
||||
@@ -1,9 +1,59 @@
|
||||
namespace Common.GUI.Controls
|
||||
{
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
public partial class MainMenu : Menu
|
||||
{
|
||||
public MainMenu() => this.InitializeComponent();
|
||||
|
||||
private void MenuItem_Click_LightMode(object sender, RoutedEventArgs args)
|
||||
{
|
||||
App.Current
|
||||
.Resources
|
||||
.MergedDictionaries[0]
|
||||
.Source = new Uri("Theme/Colors.light.xaml", UriKind.Relative);
|
||||
this.SetTheme("light");
|
||||
}
|
||||
|
||||
private void MenuItem_Click_DarkMode(object sender, RoutedEventArgs args)
|
||||
{
|
||||
App.Current
|
||||
.Resources
|
||||
.MergedDictionaries[0]
|
||||
.Source = new Uri("Theme/Colors.dark.xaml", UriKind.Relative);
|
||||
this.SetTheme("dark");
|
||||
}
|
||||
|
||||
private void MenuItem_Click_Navigate(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is MenuItem menuItem && menuItem.CommandParameter != null)
|
||||
{
|
||||
if (App.Current.MainWindow is NavigationWindow navigationWindow)
|
||||
{
|
||||
navigationWindow.Navigate(new Uri($"{menuItem.CommandParameter}", UriKind.Relative));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTheme(string theme)
|
||||
{
|
||||
var dll = typeof(App).Assembly.Location;
|
||||
var configuration = ConfigurationManager.OpenExeConfiguration(dll);
|
||||
var settings = configuration.AppSettings.Settings;
|
||||
|
||||
if (settings[nameof(theme)] is null)
|
||||
{
|
||||
settings.Add(nameof(theme), theme);
|
||||
}
|
||||
|
||||
settings[nameof(theme)].Value = theme;
|
||||
|
||||
configuration.Save(ConfigurationSaveMode.Modified);
|
||||
ConfigurationManager.RefreshSection("appSettings");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,4 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
ShowsNavigationUI="False"
|
||||
Source="Pages/MainPage.xaml">
|
||||
</NavigationWindow>
|
||||
Source="Pages/MainPage.xaml" />
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
namespace Common.GUI
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
public partial class MainWindow : NavigationWindow
|
||||
{
|
||||
public MainWindow() => this.InitializeComponent();
|
||||
public MainWindow()
|
||||
=> this.InitializeComponent();
|
||||
|
||||
private void MenuItem_Click_ThemeLight(object sender, RoutedEventArgs e)
|
||||
=> App.Current
|
||||
.Resources
|
||||
.MergedDictionaries[0]
|
||||
.Source = new Uri("Styles/Colors.light.xaml", UriKind.Relative);
|
||||
|
||||
private void MenuItem_Click_ThemeDark(object sender, RoutedEventArgs e)
|
||||
=> App.Current
|
||||
.Resources
|
||||
.MergedDictionaries[0]
|
||||
.Source = new Uri("Styles/Colors.dark.xaml", UriKind.Relative);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
namespace Common.GUI.Models.Base
|
||||
{
|
||||
using System;
|
||||
|
||||
public class Arguments
|
||||
{
|
||||
private object[] values = Array.Empty<object>();
|
||||
|
||||
public object[] Values => this.values;
|
||||
|
||||
internal void Reset()
|
||||
=> Array.Resize(ref this.values, 0);
|
||||
|
||||
internal void SetValues(object[] arguments)
|
||||
{
|
||||
var argsLength = arguments?.Length ?? 0;
|
||||
|
||||
if (argsLength <= 0)
|
||||
{
|
||||
this.Reset();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Array.Resize(ref this.values, argsLength);
|
||||
Array.Copy(arguments, 0, this.values, 0, argsLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
namespace Common.GUI.Models
|
||||
{
|
||||
using Common.GUI.Models.Base;
|
||||
using Common.GUI.ViewModels.Eregister;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using System.Windows;
|
||||
|
||||
public class Services
|
||||
{
|
||||
private static readonly ServiceProvider serviceProvider = ConfigureServices();
|
||||
|
||||
public Services() => App.Current.Exit += this.App_Exit;
|
||||
|
||||
public EregisterManualProgrammingVM EregisterManualProgrammingVM => serviceProvider.GetService<EregisterManualProgrammingVM>();
|
||||
|
||||
private void App_Exit(object sender, ExitEventArgs args)
|
||||
{
|
||||
App.Current.Exit -= this.App_Exit;
|
||||
|
||||
serviceProvider.Dispose();
|
||||
}
|
||||
|
||||
private static ServiceProvider ConfigureServices()
|
||||
=> new ServiceCollection()
|
||||
.AddSingleton<Arguments>()
|
||||
.AddSingleton<EregisterManualProgrammingVM>()
|
||||
.BuildServiceProvider();
|
||||
|
||||
public static T GetService<T>()
|
||||
=> serviceProvider.GetService<T>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
<Page x:Class="Common.GUI.Pages.ControlsPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Controls="clr-namespace:Common.GUI.Controls"
|
||||
xmlns:Local="clr-namespace:Common.GUI.Pages"
|
||||
FontFamily="Verdana">
|
||||
<Controls:MainLayout>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ScrollViewer Background="{DynamicResource md_theme_background}" Grid.Column="0">
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Heading3}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading2}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading1}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" Padding="20 3 30 3" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
<GridSplitter Background="{DynamicResource primary}"
|
||||
BorderBrush="{DynamicResource primary}"
|
||||
BorderThickness="1 0"
|
||||
Grid.Column="1"
|
||||
ResizeDirection="Columns"
|
||||
ResizeBehavior="PreviousAndNext"
|
||||
Width="2"/>
|
||||
<ScrollViewer Grid.Column="2" Margin="0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel>
|
||||
<Label Style="{StaticResource Heading1}" Content="Heading 1" />
|
||||
<Label Style="{StaticResource Heading2}" Content="Heading 2" />
|
||||
<Label Style="{StaticResource Heading3}" Content="Heading 3" />
|
||||
<Label Style="{StaticResource Heading4}" Content="Heading 4" />
|
||||
<Label Style="{StaticResource Heading5}" Content="Heading 5" />
|
||||
<Label Style="{StaticResource Lable}" Content="Just label text" />
|
||||
<StackPanel Orientation="Horizontal" Margin="0 0 10 0">
|
||||
<Button Content="Button" Margin="10 10 0 0" Style="{DynamicResource Button}" />
|
||||
<Button Content="Button" Margin="10 10 0 0" Style="{DynamicResource ButtonSecondary}" />
|
||||
<Button Content="Button" Margin="10 10 0 0" Style="{DynamicResource ButtonPrimary}" />
|
||||
<Button Content="Button" Margin="10 10 0 0" Style="{DynamicResource ButtonTertiary}" />
|
||||
<Button Content="Button" Margin="10 10 0 0" Style="{DynamicResource ButtonDanger}" />
|
||||
</StackPanel>
|
||||
<ProgressBar BorderThickness="2"
|
||||
BorderBrush="{DynamicResource md_theme_surfaceContainer}"
|
||||
Foreground="{DynamicResource md_theme_surfaceContainerHighest_highContrast}"
|
||||
Value="34"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Margin="10 10 10 0" />
|
||||
<ProgressBar BorderThickness="2"
|
||||
BorderBrush="{DynamicResource md_theme_surfaceContainer}"
|
||||
Foreground="{DynamicResource md_theme_secondary}"
|
||||
Value="34"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Margin="10 10 10 0" />
|
||||
<ProgressBar BorderThickness="2"
|
||||
BorderBrush="{DynamicResource md_theme_surfaceContainer}"
|
||||
Foreground="{DynamicResource md_theme_primary}"
|
||||
Value="34"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Margin="10 10 10 0" />
|
||||
<ProgressBar BorderThickness="2"
|
||||
BorderBrush="{DynamicResource md_theme_surfaceContainer}"
|
||||
Foreground="{DynamicResource md_theme_tertiary}"
|
||||
Value="34"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Margin="10 10 10 0" />
|
||||
<ProgressBar BorderThickness="2"
|
||||
BorderBrush="{DynamicResource md_theme_surfaceContainer}"
|
||||
Foreground="{DynamicResource md_theme_error}"
|
||||
Value="34"
|
||||
Minimum="0"
|
||||
Maximum="100"
|
||||
Margin="10 10 10 0" />
|
||||
<Rectangle Margin="0 0 0 20" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
<GridSplitter Background="{DynamicResource primary}"
|
||||
BorderBrush="{DynamicResource primary}"
|
||||
BorderThickness="1 0"
|
||||
Grid.Column="3"
|
||||
ResizeDirection="Columns"
|
||||
ResizeBehavior="PreviousAndNext"
|
||||
Width="2"/>
|
||||
<ScrollViewer Grid.Column="4">
|
||||
<StackPanel Grid.Row="2" Margin="0 0 0 10">
|
||||
<TextBox Tag="Text box without value" Text="" />
|
||||
<TextBox Tag="Text box with value" Text="This text box has value" />
|
||||
<CheckBox Margin="10 10 10 0">
|
||||
<TextBlock Text="Check box example with long text - Click to switch status." TextWrapping="Wrap" />
|
||||
</CheckBox>
|
||||
<RadioButton Content="First value" GroupName="radioBtns" Margin="10 10 10 0"/>
|
||||
<RadioButton Content="Second value" GroupName="radioBtns" Margin="10 10 10 0"/>
|
||||
<RadioButton Content="Third value" GroupName="radioBtns" Margin="10 10 10 0"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
<GridSplitter Background="{DynamicResource primary}"
|
||||
BorderBrush="{DynamicResource primary}"
|
||||
BorderThickness="0 1"
|
||||
Grid.Row="1"
|
||||
ResizeDirection="Rows"
|
||||
HorizontalAlignment="Stretch"
|
||||
ResizeBehavior="PreviousAndNext"
|
||||
Height="2"/>
|
||||
<ScrollViewer Grid.Row="2">
|
||||
<StackPanel Margin="0 0 0 10">
|
||||
<TextBox Tag="Text box without value" Text="" />
|
||||
<TextBox Tag="Text box with value" Text="This text box has value" />
|
||||
<CheckBox Content="Check box example with long text - Click to switch status." Margin="10 10 10 0"/>
|
||||
<RadioButton Content="First value" GroupName="radioBtns" Margin="10 10 10 0"/>
|
||||
<RadioButton Content="Second value" GroupName="radioBtns" Margin="10 10 10 0"/>
|
||||
<RadioButton Content="Third value" GroupName="radioBtns" Margin="10 10 10 0"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Controls:MainLayout>
|
||||
</Page>
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Common.GUI.Pages
|
||||
{
|
||||
using System.Windows.Controls;
|
||||
|
||||
public partial class ControlsPage : Page
|
||||
{
|
||||
public ControlsPage() => this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -4,155 +4,40 @@
|
||||
xmlns:Controls="clr-namespace:Common.GUI.Controls"
|
||||
xmlns:VM="clr-namespace:Common.GUI.ViewModels.Eregister">
|
||||
<Controls:MainLayout>
|
||||
<Grid DataContext="{Binding EregisterManualProgrammingVM, Source={StaticResource VMLocator}}">
|
||||
<Grid DataContext="{Binding EregisterManualProgrammingVM, Source={StaticResource Services}}" Margin="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ScrollViewer Grid.Column="0">
|
||||
<ItemsControl ItemsSource="{Binding ItemsSource}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type VM:EregisterFeatureItemVM}" >
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Background="WhiteSmoke"
|
||||
FontWeight="Bold"
|
||||
Grid.Row="0"
|
||||
Padding="10 3"
|
||||
Text="{Binding Header}" />
|
||||
<ItemsControl Grid.Row="1" ItemsSource="{Binding ItemsSource}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type VM:EregisterFeatureItemVM}" >
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0"
|
||||
Padding="10 3"
|
||||
Text="{Binding Header}" />
|
||||
<ItemsControl Grid.Row="1" ItemsSource="{Binding ItemsSource}" Margin="20 0 0 0">
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type VM:EregisterFeatureBooleanValueVM}">
|
||||
<CheckBox Background="WhiteSmoke"
|
||||
Content="{Binding Header}"
|
||||
Foreground="DimGray"
|
||||
HorizontalAlignment="Stretch"
|
||||
IsChecked="{Binding Value}"
|
||||
Margin="0 0 10 2"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type VM:EregisterFeatureByteValueVM}">
|
||||
<StackPanel Orientation="Horizontal"
|
||||
FlowDirection="LeftToRight"
|
||||
Margin="0 0 10 2">
|
||||
<TextBox Background="WhiteSmoke"
|
||||
BorderThickness="0 0 1 1"
|
||||
HorizontalAlignment="Right"
|
||||
Padding="10 3"
|
||||
Text="{Binding Value}"
|
||||
Width="150" />
|
||||
<TextBlock Foreground="DimGray"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="10 3"
|
||||
Text="{Binding Header}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type VM:EregisterFeatureInt32ValueVM}">
|
||||
<StackPanel Orientation="Horizontal"
|
||||
FlowDirection="LeftToRight"
|
||||
Margin="0 0 10 2">
|
||||
<TextBox Background="WhiteSmoke"
|
||||
BorderThickness="0 0 1 1"
|
||||
HorizontalAlignment="Right"
|
||||
Padding="10 3"
|
||||
Text="{Binding Value}"
|
||||
Width="150" />
|
||||
<TextBlock Foreground="DimGray"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="10 3"
|
||||
Text="{Binding Header}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type VM:EregisterFeatureUInt16ValueVM}">
|
||||
<StackPanel Orientation="Horizontal"
|
||||
FlowDirection="LeftToRight"
|
||||
Margin="0 0 10 2">
|
||||
<TextBox Background="WhiteSmoke"
|
||||
BorderThickness="0 0 1 1"
|
||||
HorizontalAlignment="Right"
|
||||
Padding="10 3"
|
||||
Text="{Binding Value}"
|
||||
Width="150" />
|
||||
<TextBlock Foreground="DimGray"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="10 3"
|
||||
Text="{Binding Header}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type VM:EregisterFeatureUInt32ValueVM}">
|
||||
<StackPanel Orientation="Horizontal"
|
||||
FlowDirection="LeftToRight"
|
||||
Margin="0 0 10 2">
|
||||
<TextBox Background="WhiteSmoke"
|
||||
BorderThickness="0 0 1 1"
|
||||
HorizontalAlignment="Right"
|
||||
Padding="10 3"
|
||||
Text="{Binding Value}"
|
||||
Width="150" />
|
||||
<TextBlock Foreground="DimGray"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="10 3"
|
||||
Text="{Binding Header}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type VM:EregisterFeatureOptionValueVM}">
|
||||
<StackPanel FlowDirection="LeftToRight"
|
||||
Orientation="Horizontal"
|
||||
Margin="0 0 10 2">
|
||||
<ComboBox Background="WhiteSmoke"
|
||||
BorderThickness="0"
|
||||
HorizontalAlignment="Right"
|
||||
ItemsSource="{Binding Options}"
|
||||
Padding="10 3"
|
||||
SelectedItem="{Binding Option}"
|
||||
Width="150" />
|
||||
<TextBlock Foreground="DimGray"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="10 3"
|
||||
Text="{Binding Header}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type VM:EregisterFeatureStringValueVM}">
|
||||
<StackPanel FlowDirection="LeftToRight"
|
||||
Orientation="Horizontal"
|
||||
Margin="0 0 10 2">
|
||||
<TextBox Background="WhiteSmoke"
|
||||
BorderThickness="0 0 1 1"
|
||||
HorizontalAlignment="Right"
|
||||
Padding="10 3"
|
||||
Text="{Binding Value}"
|
||||
Width="150" />
|
||||
<TextBlock Foreground="DimGray"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="10 3"
|
||||
Text="{Binding Header}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
<TreeView Grid.Column="0" ItemsSource="{Binding ItemsSource}">
|
||||
<TreeView.Resources>
|
||||
<DataTemplate DataType="{x:Type VM:EregisterFeatureBooleanValueVM}">
|
||||
<TreeViewItem Margin="-30 0 0 0" Padding="0">
|
||||
<TreeViewItem.Header>
|
||||
<CheckBox Content="{Binding Header}" IsChecked="{Binding Value}" Margin="0" />
|
||||
</TreeViewItem.Header>
|
||||
</TreeViewItem>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type VM:EregisterFeatureParameterItemVM}">
|
||||
<TreeViewItem Margin="-30 0 0 0" Padding="0">
|
||||
<TreeViewItem.Header>
|
||||
<TextBox Text="{Binding Value}" Tag="{Binding Header}" Margin="0" />
|
||||
</TreeViewItem.Header>
|
||||
</TreeViewItem>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type VM:EregisterFeatureItemVM}">
|
||||
<TreeViewItem Header="{Binding Header}" ItemsSource="{Binding ItemsSource}" Margin="-30 0 0 0" />
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
</TreeView>
|
||||
<GridSplitter Background="{DynamicResource primary}"
|
||||
BorderBrush="{DynamicResource primary}"
|
||||
BorderThickness="1 0"
|
||||
Grid.Column="1"
|
||||
ResizeDirection="Columns"
|
||||
ResizeBehavior="PreviousAndNext"
|
||||
Width="2"/>
|
||||
</Grid>
|
||||
</Controls:MainLayout>
|
||||
</Page>
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
<Page x:Class="Common.GUI.MainPage"
|
||||
<Page x:Class="Common.GUI.Pages.MainPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Controls="clr-namespace:Common.GUI.Controls">
|
||||
xmlns:Controls="clr-namespace:Common.GUI.Controls"
|
||||
FontFamily="Verdana">
|
||||
<Page.Resources>
|
||||
</Page.Resources>
|
||||
<Controls:MainLayout>
|
||||
<Grid DataContext="{Binding MainPageVM, Source={StaticResource VMLocator}}">
|
||||
<Label Content="Main page" />
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
</Controls:MainLayout>
|
||||
</Page>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Common.GUI
|
||||
namespace Common.GUI.Pages
|
||||
{
|
||||
using System.Windows.Controls;
|
||||
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="md_theme_primary" Color="#8CCFF1" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimary" Color="#003547" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryContainer" Color="#004D66" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryContainer" Color="#C0E8FF" />
|
||||
<SolidColorBrush x:Key="md_theme_secondary" Color="#9BD4A0" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondary" Color="#003915" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryContainer" Color="#1C5129" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryContainer" Color="#B7F1BA" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiary" Color="#FFB692" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiary" Color="#542103" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryContainer" Color="#703717" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryContainer" Color="#FFDBCB" />
|
||||
<SolidColorBrush x:Key="md_theme_error" Color="#FFB4AB" />
|
||||
<SolidColorBrush x:Key="md_theme_onError" Color="#690005" />
|
||||
<SolidColorBrush x:Key="md_theme_errorContainer" Color="#93000A" />
|
||||
<SolidColorBrush x:Key="md_theme_onErrorContainer" Color="#FFDAD6" />
|
||||
<SolidColorBrush x:Key="md_theme_background" Color="#0F1417" />
|
||||
<SolidColorBrush x:Key="md_theme_onBackground" Color="#DFE3E7" />
|
||||
<SolidColorBrush x:Key="md_theme_surface" Color="#0F1417" />
|
||||
<SolidColorBrush x:Key="md_theme_onSurface" Color="#DFE3E7" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceVariant" Color="#40484C" />
|
||||
<SolidColorBrush x:Key="md_theme_onSurfaceVariant" Color="#C0C7CD" />
|
||||
<SolidColorBrush x:Key="md_theme_outline" Color="#8A9297" />
|
||||
<SolidColorBrush x:Key="md_theme_outlineVariant" Color="#40484C" />
|
||||
<SolidColorBrush x:Key="md_theme_scrim" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_inverseSurface" Color="#DFE3E7" />
|
||||
<SolidColorBrush x:Key="md_theme_inverseOnSurface" Color="#2C3134" />
|
||||
<SolidColorBrush x:Key="md_theme_inversePrimary" Color="#156683" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryFixed" Color="#C0E8FF" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryFixed" Color="#001F2B" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryFixedDim" Color="#8CCFF1" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryFixedVariant" Color="#004D66" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryFixed" Color="#B7F1BA" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryFixed" Color="#002109" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryFixedDim" Color="#9BD4A0" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryFixedVariant" Color="#1C5129" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryFixed" Color="#FFDBCB" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryFixed" Color="#341100" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryFixedDim" Color="#FFB692" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryFixedVariant" Color="#703717" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceDim" Color="#0F1417" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceBright" Color="#353A3D" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerLowest" Color="#0A0F12" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerLow" Color="#171C1F" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainer" Color="#1B2023" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerHigh" Color="#262B2E" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerHighest" Color="#303539" />
|
||||
<SolidColorBrush x:Key="md_theme_primary_mediumContrast" Color="#B0E4FF" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimary_mediumContrast" Color="#002938" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryContainer_mediumContrast" Color="#5599B8" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryContainer_mediumContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_secondary_mediumContrast" Color="#B1EAB4" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondary_mediumContrast" Color="#002D0F" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryContainer_mediumContrast" Color="#679D6D" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryContainer_mediumContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiary_mediumContrast" Color="#FFD3BF" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiary_mediumContrast" Color="#451800" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryContainer_mediumContrast" Color="#C97E59" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryContainer_mediumContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_error_mediumContrast" Color="#FFD2CC" />
|
||||
<SolidColorBrush x:Key="md_theme_onError_mediumContrast" Color="#540003" />
|
||||
<SolidColorBrush x:Key="md_theme_errorContainer_mediumContrast" Color="#FF5449" />
|
||||
<SolidColorBrush x:Key="md_theme_onErrorContainer_mediumContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_background_mediumContrast" Color="#0F1417" />
|
||||
<SolidColorBrush x:Key="md_theme_onBackground_mediumContrast" Color="#DFE3E7" />
|
||||
<SolidColorBrush x:Key="md_theme_surface_mediumContrast" Color="#0F1417" />
|
||||
<SolidColorBrush x:Key="md_theme_onSurface_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceVariant_mediumContrast" Color="#40484C" />
|
||||
<SolidColorBrush x:Key="md_theme_onSurfaceVariant_mediumContrast" Color="#D6DDE3" />
|
||||
<SolidColorBrush x:Key="md_theme_outline_mediumContrast" Color="#ABB3B8" />
|
||||
<SolidColorBrush x:Key="md_theme_outlineVariant_mediumContrast" Color="#8A9196" />
|
||||
<SolidColorBrush x:Key="md_theme_scrim_mediumContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_inverseSurface_mediumContrast" Color="#DFE3E7" />
|
||||
<SolidColorBrush x:Key="md_theme_inverseOnSurface_mediumContrast" Color="#262B2E" />
|
||||
<SolidColorBrush x:Key="md_theme_inversePrimary_mediumContrast" Color="#004E67" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryFixed_mediumContrast" Color="#C0E8FF" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryFixed_mediumContrast" Color="#00131C" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryFixedDim_mediumContrast" Color="#8CCFF1" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryFixedVariant_mediumContrast" Color="#003B4F" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryFixed_mediumContrast" Color="#B7F1BA" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryFixed_mediumContrast" Color="#001505" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryFixedDim_mediumContrast" Color="#9BD4A0" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryFixedVariant_mediumContrast" Color="#063F19" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryFixed_mediumContrast" Color="#FFDBCB" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryFixed_mediumContrast" Color="#240900" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryFixedDim_mediumContrast" Color="#FFB692" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryFixedVariant_mediumContrast" Color="#5B2708" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceDim_mediumContrast" Color="#0F1417" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceBright_mediumContrast" Color="#404548" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerLowest_mediumContrast" Color="#04080A" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerLow_mediumContrast" Color="#191E21" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainer_mediumContrast" Color="#24292C" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerHigh_mediumContrast" Color="#2E3336" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerHighest_mediumContrast" Color="#393E41" />
|
||||
<SolidColorBrush x:Key="md_theme_primary_highContrast" Color="#DFF3FF" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimary_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryContainer_highContrast" Color="#88CBED" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryContainer_highContrast" Color="#000D14" />
|
||||
<SolidColorBrush x:Key="md_theme_secondary_highContrast" Color="#C4FEC7" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondary_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryContainer_highContrast" Color="#98D09C" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryContainer_highContrast" Color="#000F03" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiary_highContrast" Color="#FFECE5" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiary_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryContainer_highContrast" Color="#FFB08A" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryContainer_highContrast" Color="#1A0500" />
|
||||
<SolidColorBrush x:Key="md_theme_error_highContrast" Color="#FFECE9" />
|
||||
<SolidColorBrush x:Key="md_theme_onError_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_errorContainer_highContrast" Color="#FFAEA4" />
|
||||
<SolidColorBrush x:Key="md_theme_onErrorContainer_highContrast" Color="#220001" />
|
||||
<SolidColorBrush x:Key="md_theme_background_highContrast" Color="#0F1417" />
|
||||
<SolidColorBrush x:Key="md_theme_onBackground_highContrast" Color="#DFE3E7" />
|
||||
<SolidColorBrush x:Key="md_theme_surface_highContrast" Color="#0F1417" />
|
||||
<SolidColorBrush x:Key="md_theme_onSurface_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceVariant_highContrast" Color="#40484C" />
|
||||
<SolidColorBrush x:Key="md_theme_onSurfaceVariant_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_outline_highContrast" Color="#EAF1F7" />
|
||||
<SolidColorBrush x:Key="md_theme_outlineVariant_highContrast" Color="#BCC4C9" />
|
||||
<SolidColorBrush x:Key="md_theme_scrim_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_inverseSurface_highContrast" Color="#DFE3E7" />
|
||||
<SolidColorBrush x:Key="md_theme_inverseOnSurface_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_inversePrimary_highContrast" Color="#004E67" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryFixed_highContrast" Color="#C0E8FF" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryFixed_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryFixedDim_highContrast" Color="#8CCFF1" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryFixedVariant_highContrast" Color="#00131C" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryFixed_highContrast" Color="#B7F1BA" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryFixed_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryFixedDim_highContrast" Color="#9BD4A0" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryFixedVariant_highContrast" Color="#001505" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryFixed_highContrast" Color="#FFDBCB" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryFixed_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryFixedDim_highContrast" Color="#FFB692" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryFixedVariant_highContrast" Color="#240900" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceDim_highContrast" Color="#0F1417" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceBright_highContrast" Color="#4C5154" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerLowest_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerLow_highContrast" Color="#1B2023" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainer_highContrast" Color="#2C3134" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerHigh_highContrast" Color="#373C3F" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerHighest_highContrast" Color="#42474B" />
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,144 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="md_theme_primary" Color="#156683" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimary" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryContainer" Color="#C0E8FF" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryContainer" Color="#004D66" />
|
||||
<SolidColorBrush x:Key="md_theme_secondary" Color="#35693E" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondary" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryContainer" Color="#B7F1BA" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryContainer" Color="#1C5129" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiary" Color="#8D4E2C" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiary" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryContainer" Color="#FFDBCB" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryContainer" Color="#703717" />
|
||||
<SolidColorBrush x:Key="md_theme_error" Color="#BA1A1A" />
|
||||
<SolidColorBrush x:Key="md_theme_onError" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_errorContainer" Color="#FFDAD6" />
|
||||
<SolidColorBrush x:Key="md_theme_onErrorContainer" Color="#93000A" />
|
||||
<SolidColorBrush x:Key="md_theme_background" Color="#F6FAFE" />
|
||||
<SolidColorBrush x:Key="md_theme_onBackground" Color="#171C1F" />
|
||||
<SolidColorBrush x:Key="md_theme_surface" Color="#F6FAFE" />
|
||||
<SolidColorBrush x:Key="md_theme_onSurface" Color="#171C1F" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceVariant" Color="#DCE3E9" />
|
||||
<SolidColorBrush x:Key="md_theme_onSurfaceVariant" Color="#40484C" />
|
||||
<SolidColorBrush x:Key="md_theme_outline" Color="#71787D" />
|
||||
<SolidColorBrush x:Key="md_theme_outlineVariant" Color="#C0C7CD" />
|
||||
<SolidColorBrush x:Key="md_theme_scrim" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_inverseSurface" Color="#2C3134" />
|
||||
<SolidColorBrush x:Key="md_theme_inverseOnSurface" Color="#EDF1F5" />
|
||||
<SolidColorBrush x:Key="md_theme_inversePrimary" Color="#8CCFF1" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryFixed" Color="#C0E8FF" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryFixed" Color="#001F2B" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryFixedDim" Color="#8CCFF1" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryFixedVariant" Color="#004D66" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryFixed" Color="#B7F1BA" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryFixed" Color="#002109" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryFixedDim" Color="#9BD4A0" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryFixedVariant" Color="#1C5129" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryFixed" Color="#FFDBCB" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryFixed" Color="#341100" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryFixedDim" Color="#FFB692" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryFixedVariant" Color="#703717" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceDim" Color="#D6DADE" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceBright" Color="#F6FAFE" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerLowest" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerLow" Color="#F0F4F8" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainer" Color="#EAEEF2" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerHigh" Color="#E4E9EC" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerHighest" Color="#DFE3E7" />
|
||||
<SolidColorBrush x:Key="md_theme_primary_mediumContrast" Color="#003B4F" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimary_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryContainer_mediumContrast" Color="#2C7593" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryContainer_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_secondary_mediumContrast" Color="#063F19" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondary_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryContainer_mediumContrast" Color="#44784C" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryContainer_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiary_mediumContrast" Color="#5B2708" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiary_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryContainer_mediumContrast" Color="#9F5C39" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryContainer_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_error_mediumContrast" Color="#740006" />
|
||||
<SolidColorBrush x:Key="md_theme_onError_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_errorContainer_mediumContrast" Color="#CF2C27" />
|
||||
<SolidColorBrush x:Key="md_theme_onErrorContainer_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_background_mediumContrast" Color="#F6FAFE" />
|
||||
<SolidColorBrush x:Key="md_theme_onBackground_mediumContrast" Color="#171C1F" />
|
||||
<SolidColorBrush x:Key="md_theme_surface_mediumContrast" Color="#F6FAFE" />
|
||||
<SolidColorBrush x:Key="md_theme_onSurface_mediumContrast" Color="#0D1215" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceVariant_mediumContrast" Color="#DCE3E9" />
|
||||
<SolidColorBrush x:Key="md_theme_onSurfaceVariant_mediumContrast" Color="#30373C" />
|
||||
<SolidColorBrush x:Key="md_theme_outline_mediumContrast" Color="#4C5458" />
|
||||
<SolidColorBrush x:Key="md_theme_outlineVariant_mediumContrast" Color="#666E73" />
|
||||
<SolidColorBrush x:Key="md_theme_scrim_mediumContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_inverseSurface_mediumContrast" Color="#2C3134" />
|
||||
<SolidColorBrush x:Key="md_theme_inverseOnSurface_mediumContrast" Color="#EDF1F5" />
|
||||
<SolidColorBrush x:Key="md_theme_inversePrimary_mediumContrast" Color="#8CCFF1" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryFixed_mediumContrast" Color="#2C7593" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryFixed_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryFixedDim_mediumContrast" Color="#005C79" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryFixedVariant_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryFixed_mediumContrast" Color="#44784C" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryFixed_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryFixedDim_mediumContrast" Color="#2B5F36" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryFixedVariant_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryFixed_mediumContrast" Color="#9F5C39" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryFixed_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryFixedDim_mediumContrast" Color="#824424" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryFixedVariant_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceDim_mediumContrast" Color="#C3C7CB" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceBright_mediumContrast" Color="#F6FAFE" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerLowest_mediumContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerLow_mediumContrast" Color="#F0F4F8" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainer_mediumContrast" Color="#E4E9EC" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerHigh_mediumContrast" Color="#D9DDE1" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerHighest_mediumContrast" Color="#CED2D6" />
|
||||
<SolidColorBrush x:Key="md_theme_primary_highContrast" Color="#003041" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimary_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryContainer_highContrast" Color="#004F69" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryContainer_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_secondary_highContrast" Color="#003412" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondary_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryContainer_highContrast" Color="#1E532B" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryContainer_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiary_highContrast" Color="#4E1D01" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiary_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryContainer_highContrast" Color="#733919" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryContainer_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_error_highContrast" Color="#600004" />
|
||||
<SolidColorBrush x:Key="md_theme_onError_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_errorContainer_highContrast" Color="#98000A" />
|
||||
<SolidColorBrush x:Key="md_theme_onErrorContainer_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_background_highContrast" Color="#F6FAFE" />
|
||||
<SolidColorBrush x:Key="md_theme_onBackground_highContrast" Color="#171C1F" />
|
||||
<SolidColorBrush x:Key="md_theme_surface_highContrast" Color="#F6FAFE" />
|
||||
<SolidColorBrush x:Key="md_theme_onSurface_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceVariant_highContrast" Color="#DCE3E9" />
|
||||
<SolidColorBrush x:Key="md_theme_onSurfaceVariant_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_outline_highContrast" Color="#262D31" />
|
||||
<SolidColorBrush x:Key="md_theme_outlineVariant_highContrast" Color="#434A4F" />
|
||||
<SolidColorBrush x:Key="md_theme_scrim_highContrast" Color="#000000" />
|
||||
<SolidColorBrush x:Key="md_theme_inverseSurface_highContrast" Color="#2C3134" />
|
||||
<SolidColorBrush x:Key="md_theme_inverseOnSurface_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_inversePrimary_highContrast" Color="#8CCFF1" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryFixed_highContrast" Color="#004F69" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryFixed_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_primaryFixedDim_highContrast" Color="#00374A" />
|
||||
<SolidColorBrush x:Key="md_theme_onPrimaryFixedVariant_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryFixed_highContrast" Color="#1E532B" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryFixed_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_secondaryFixedDim_highContrast" Color="#013C16" />
|
||||
<SolidColorBrush x:Key="md_theme_onSecondaryFixedVariant_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryFixed_highContrast" Color="#733919" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryFixed_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_tertiaryFixedDim_highContrast" Color="#572305" />
|
||||
<SolidColorBrush x:Key="md_theme_onTertiaryFixedVariant_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceDim_highContrast" Color="#B5B9BD" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceBright_highContrast" Color="#F6FAFE" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerLowest_highContrast" Color="#FFFFFF" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerLow_highContrast" Color="#EDF1F5" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainer_highContrast" Color="#DFE3E7" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerHigh_highContrast" Color="#D1D5D9" />
|
||||
<SolidColorBrush x:Key="md_theme_surfaceContainerHighest_highContrast" Color="#C3C7CB" />
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,41 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<GeometryGroup x:Key="sensus">
|
||||
<RectangleGeometry RadiusX="47.04" /> <!--width="37.99" height="7.14"/>-->
|
||||
<RectangleGeometry RadiusX="47.04" RadiusY="11.65" /> <!--width="37.99" height="7.14"/>-->
|
||||
<RectangleGeometry RadiusX="47.04" RadiusY="23.29" /> <!--width="37.99" height="7.14"/>-->
|
||||
<PathGeometry Figures="M124.94,35h-22.3c-7.14,0-9.31,2.08-9.31,8.9v27.5h9.14V42.71h22.64V71.36h9.14V43.86c0-6.82-2.18-8.9-9.31-8.9"/>
|
||||
<PathGeometry Figures="M219.87,35V63.61H197.23V35h-9.14v27.5c0,6.82,2.18,8.9,9.31,8.9h22.3c7.14,0,9.31-2.08,9.31-8.9V35Z"/>
|
||||
<PathGeometry Figures="M55.38,35c-6.82,0-8.91,2.18-8.91,9.31V62.05c0,7.14,2.08,9.31,8.91,9.31H85V63.61H55v-7H85V49.2H55v-7H85V35Z"/>
|
||||
<PathGeometry Figures="M38.4,42.23V35H9.31C2.18,35,0,37,0,43.86v3.89c0,6.82,2.18,8.9,9.31,8.9H30.78v7H0v7.75H29.76c7.1,0,9.38-2.16,9.38-8.9V57.61c0-6.74-2.28-8.9-9.38-8.9H8.3V42.23Z"/>
|
||||
<PathGeometry Figures="M179.92,42.23V35H150.83c-7.14,0-9.32,2.08-9.32,8.9v3.89c0,6.82,2.18,8.9,9.32,8.9h21.46v7H141.52v7.75h29.76c7.1,0,9.38-2.16,9.38-8.9V57.61c0-6.74-2.28-8.9-9.38-8.9H149.82V42.23Z"/>
|
||||
<PathGeometry Figures="M274.53,42.23V35H245.44c-7.14,0-9.31,2.08-9.31,8.9v3.89c0,6.82,2.17,8.9,9.31,8.9H266.9v7H236.13v7.75h29.75c7.1,0,9.39-2.16,9.39-8.9V57.61c0-6.74-2.28-8.9-9.39-8.9H244.43V42.23Z"/>
|
||||
<PathGeometry Figures="M68.21,103.11c0-3-1.66-4.54-4.69-4.54a7.49,7.49,0,0,0-5.23,2.07l-1.42-1.7a9.79,9.79,0,0,1,6.9-2.51c3.8,0,6.84,2.1,6.84,6.38v7.7a23.25,23.25,0,0,0,.3,4h-2.3a19,19,0,0,1-.26-2.86h-.06a7,7,0,0,1-6.38,3.31c-2.67,0-6.1-1.43-6.1-5.33,0-5.42,6-5.9,12.4-5.9Zm-.75,2.55c-4.16,0-9,.46-9,3.8,0,2.51,2.13,3.33,4.13,3.33A5.48,5.48,0,0,0,68.21,107v-1.31Z"/>
|
||||
<PathGeometry Figures="M190.39,111.47v3h-2.55V86.07h2.55V99.92h.07a8,8,0,0,1,6.65-3.49c5.49,0,9.09,4.05,9.09,9.23s-3.6,9.24-9.09,9.24a8.08,8.08,0,0,1-6.65-3.43Zm6.47-12.91a7.09,7.09,0,0,0,0,14.16c4.22,0,6.64-3.15,6.64-7.06s-2.41-7.09-6.64-7.09"/>
|
||||
<PathGeometry Figures="M209.09,96.87h2.46c.06.95.15,2.25.15,3h.07a6.25,6.25,0,0,1,5.64-3.45,6.58,6.58,0,0,1,1.68.18l-.34,2.4a6.89,6.89,0,0,0-1.8-.22c-2.7,0-5.15,2-5.15,6.65v9h-2.55V100.74c0-.94,0-2.66-.16-3.87"/>
|
||||
<PathGeometry Figures="M232.09,103.11c0-3-1.66-4.54-4.69-4.54a7.46,7.46,0,0,0-5.23,2.07l-1.41-1.7a9.74,9.74,0,0,1,6.89-2.51c3.8,0,6.84,2.1,6.84,6.38v7.7a24.22,24.22,0,0,0,.31,4h-2.3a18.26,18.26,0,0,1-.26-2.86h-.07a7.05,7.05,0,0,1-6.39,3.31c-2.66,0-6.07-1.43-6.07-5.33,0-5.42,6-5.9,12.39-5.9Zm-.75,2.55c-4.18,0-9,.46-9,3.8,0,2.51,2.14,3.33,4.13,3.33a5.48,5.48,0,0,0,5.64-5.82v-1.31Z"/>
|
||||
<PathGeometry Figures="M241.1,96.87c.06.95.16,2.25.16,3h.07a6.85,6.85,0,0,1,6-3.45c4.47,0,6.68,2.89,6.68,7.25v10.78h-2.55v-9.73c0-3.67-1.08-6.16-4.77-6.16-2.69,0-5.33,2.18-5.33,6.87v9h-2.55V100.74c0-.94,0-2.66-.14-3.87Z"/>
|
||||
<PathGeometry Figures="M266,114.9c-5.49,0-9.09-4.06-9.09-9.24s3.59-9.23,9.09-9.23a8,8,0,0,1,6.65,3.49h.07V86.07h2.55v28.39h-2.55v-3h-.07A8.1,8.1,0,0,1,266,114.9m.27-2.18a6.71,6.71,0,0,0,6.75-7.06c0-4-2.81-7.09-6.75-7.09-4.24,0-6.64,3.19-6.64,7.09s2.4,7.06,6.64,7.06"/>
|
||||
<PathGeometry Figures="M176.07,111.18v3.28h-1.85c-3.13,0-4.65-1.63-4.65-5.28v-5.72c0-1.79-.56-3.63-2.82-3.63s-3,1.84-3,3.63v11h-4v-11c0-1.79-.78-3.63-3.09-3.63s-3.06,1.84-3.06,3.63v11h-3.92V103.32c0-4.35,2.8-7,7-7a6.78,6.78,0,0,1,5.09,2.06,6.77,6.77,0,0,1,5.08-2.06c3.85,0,6.59,2.48,6.59,7v5.91c0,1.35.62,1.95,1.76,1.95Zm-30.61.47a11.42,11.42,0,0,1-7.74,3.07c-5.88,0-9.35-3.82-9.35-9.22s3.73-9.23,9-9.23c5.48,0,8.82,4.25,8.82,9.53,0,.66-.05,1.33-.05,1.33h-13.7c.51,2.59,2.1,4.22,5.28,4.22a7.37,7.37,0,0,0,5.21-2.17Zm-13-7.63h9.73c-.45-2.66-2.2-4.39-4.78-4.39s-4.39,1.79-5,4.39M120,109c0,3.83,1.58,5.42,4.83,5.42h1.78v-3.37h-.84c-1.2,0-1.87-.59-1.87-2.05V86.95H120Zm-10.95,2H109c-1,0-1.55-1.49-2.54-4.18l-1.64-4.52c-1.54-4.21-3.1-6.11-6.66-6.11-3,0-4.52,1.81-6.38,4.32L90.4,102.4,86,96.56H81.39l6.69,8.77-2.61,3.51c-1.34,1.8-2.16,2.34-3.31,2.34h-.78v3.28h1.67a4.91,4.91,0,0,0,4.41-2.27l2.86-4,4.6,6.29h4.69l-7-9.21,1.74-2.3c1.58-2.11,2.33-3.12,3.67-3.12s2.12,1.31,3.32,4.36l2,5.09c1.15,3,2.26,5.17,4.29,5.17h.26l-1,2.58c-.8,2-1.56,3.28-3.67,3.28h-.92v3.33h1.34c3.13,0,5.36-1.54,6.81-5.59l7.73-21.51H114Z"/>
|
||||
</GeometryGroup>
|
||||
|
||||
<PathGeometry x:Key="bi_chevron_right"
|
||||
FillRule="evenodd"
|
||||
Figures="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"/>
|
||||
|
||||
<GeometryGroup x:Key="bi_home_fill">
|
||||
<PathGeometry Figures="M8.707 1.5a1 1 0 0 0-1.414 0L.646 8.146a.5.5 0 0 0 .708.708L8 2.207l6.646 6.647a.5.5 0 0 0 .708-.708L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293z"/>
|
||||
<PathGeometry Figures="m8 3.293 6 6V13.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 13.5V9.293z"/>
|
||||
</GeometryGroup>
|
||||
|
||||
<GeometryGroup x:Key="bi_sun">
|
||||
<PathGeometry Figures="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6m0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0m0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0m9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708"/>
|
||||
</GeometryGroup>
|
||||
|
||||
<GeometryGroup x:Key="bi_moon_stars">
|
||||
<PathGeometry Figures="M6 .278a.77.77 0 0 1 .08.858 7.2 7.2 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277q.792-.001 1.533-.16a.79.79 0 0 1 .81.316.73.73 0 0 1-.031.893A8.35 8.35 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.75.75 0 0 1 6 .278"/>
|
||||
<PathGeometry Figures="M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.73 1.73 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.73 1.73 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.73 1.73 0 0 0 1.097-1.097zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"/>
|
||||
</GeometryGroup>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,338 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="FocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="2" StrokeDashArray="1 2"
|
||||
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
|
||||
SnapsToDevicePixels="true" StrokeThickness="1"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="RepeatButtonTransparent" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Width" Value="4" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Rectangle Fill="{TemplateBinding Background}"
|
||||
Height="{TemplateBinding Height}"
|
||||
Width="{TemplateBinding Width}"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="1"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border x:Name="border"
|
||||
Background="{DynamicResource md_theme_background}"
|
||||
BorderBrush="{DynamicResource md_theme_background}"
|
||||
BorderThickness="1"
|
||||
SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="contentPresenter"
|
||||
Focusable="False"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_background}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_background}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_background}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_background}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity"
|
||||
TargetName="contentPresenter"
|
||||
Value="0.56"/>
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_background}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_background}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarThumbVertical" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Rectangle x:Name="rectangle"
|
||||
Fill="{DynamicResource md_theme_surfaceContainerHighest}"
|
||||
Height="{TemplateBinding Height}"
|
||||
SnapsToDevicePixels="True"
|
||||
Width="5"/>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Fill"
|
||||
TargetName="rectangle"
|
||||
Value="{DynamicResource md_theme_inverseSurface}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsDragging" Value="true">
|
||||
<Setter Property="Fill"
|
||||
TargetName="rectangle"
|
||||
Value="{DynamicResource md_theme_inverseSurface}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarThumbHorizontal" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Rectangle x:Name="rectangle"
|
||||
Fill="{DynamicResource md_theme_surfaceContainerHighest}"
|
||||
Height="5"
|
||||
SnapsToDevicePixels="True"
|
||||
Width="{TemplateBinding Width}"/>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Fill"
|
||||
TargetName="rectangle"
|
||||
Value="{DynamicResource md_theme_inverseSurface}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsDragging" Value="true">
|
||||
<Setter Property="Fill"
|
||||
TargetName="rectangle"
|
||||
Value="{DynamicResource md_theme_inverseSurface}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_background_mediumContrast}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource md_theme_background_mediumContrast}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_inverseSurface}"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Width" Value="10"/>
|
||||
<Setter Property="MinWidth" Value="10"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
||||
<Grid x:Name="Bg"
|
||||
SnapsToDevicePixels="true"
|
||||
Width="{TemplateBinding Width}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="0.00001*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="0"
|
||||
Grid.Row="1" />
|
||||
<RepeatButton x:Name="PART_LineUpButton"
|
||||
Command="{x:Static ScrollBar.LineUpCommand}"
|
||||
IsEnabled="{TemplateBinding IsMouseOver}"
|
||||
Style="{StaticResource ScrollBarButton}">
|
||||
<Path x:Name="ArrowTop"
|
||||
Margin="3,4,3,3"
|
||||
Stretch="Uniform"/>
|
||||
</RepeatButton>
|
||||
<Track x:Name="PART_Track"
|
||||
IsDirectionReversed="true"
|
||||
IsEnabled="{TemplateBinding IsMouseOver}"
|
||||
Grid.Row="1"
|
||||
Margin="2">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="{x:Static ScrollBar.PageUpCommand}"
|
||||
Style="{StaticResource RepeatButtonTransparent}"/>
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Command="{x:Static ScrollBar.PageDownCommand}"
|
||||
Style="{StaticResource RepeatButtonTransparent}"/>
|
||||
</Track.IncreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb Style="{StaticResource ScrollBarThumbVertical}"/>
|
||||
</Track.Thumb>
|
||||
</Track>
|
||||
<RepeatButton x:Name="PART_LineDownButton"
|
||||
Command="{x:Static ScrollBar.LineDownCommand}"
|
||||
IsEnabled="{TemplateBinding IsMouseOver}"
|
||||
Grid.Row="2" Style="{StaticResource ScrollBarButton}">
|
||||
<Path x:Name="ArrowBottom"
|
||||
Margin="3,4,3,3"
|
||||
Stretch="Uniform"/>
|
||||
</RepeatButton>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Orientation" Value="Horizontal">
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="MinWidth" Value="0"/>
|
||||
<Setter Property="Height" Value="10"/>
|
||||
<Setter Property="MinHeight" Value="10"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollBar}">
|
||||
<Grid x:Name="Bg"
|
||||
SnapsToDevicePixels="true"
|
||||
Height="{TemplateBinding Height}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="0.00001*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="0"
|
||||
Grid.Column="1"/>
|
||||
<RepeatButton x:Name="PART_LineLeftButton"
|
||||
Command="{x:Static ScrollBar.LineLeftCommand}"
|
||||
IsEnabled="{TemplateBinding IsMouseOver}"
|
||||
Style="{StaticResource ScrollBarButton}">
|
||||
<Path x:Name="ArrowLeft"
|
||||
Margin="3"
|
||||
Stretch="Uniform"/>
|
||||
</RepeatButton>
|
||||
<Track x:Name="PART_Track"
|
||||
Grid.Column="1"
|
||||
IsEnabled="{TemplateBinding IsMouseOver}"
|
||||
Margin="2">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Command="{x:Static ScrollBar.PageLeftCommand}"
|
||||
Style="{StaticResource RepeatButtonTransparent}"/>
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Command="{x:Static ScrollBar.PageRightCommand}"
|
||||
Style="{StaticResource RepeatButtonTransparent}"/>
|
||||
</Track.IncreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb Style="{StaticResource ScrollBarThumbHorizontal}"/>
|
||||
</Track.Thumb>
|
||||
</Track>
|
||||
<RepeatButton x:Name="PART_LineRightButton"
|
||||
Command="{x:Static ScrollBar.LineRightCommand}"
|
||||
Grid.Column="2"
|
||||
IsEnabled="{TemplateBinding IsMouseOver}"
|
||||
Style="{StaticResource ScrollBarButton}">
|
||||
<Path x:Name="ArrowRight"
|
||||
Margin="3"
|
||||
Stretch="Uniform"/>
|
||||
</RepeatButton>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type ScrollViewer}">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle x:Name="Corner"
|
||||
Grid.Column="1"
|
||||
Fill="{TemplateBinding Background}"
|
||||
Grid.Row="1"/>
|
||||
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
|
||||
CanHorizontallyScroll="False"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CanVerticallyScroll="False" Grid.Column="0"
|
||||
Content="{TemplateBinding Content}"
|
||||
CanContentScroll="{TemplateBinding CanContentScroll}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
Grid.Row="0"/>
|
||||
<ScrollBar x:Name="PART_VerticalScrollBar"
|
||||
AutomationProperties.AutomationId="VerticalScrollBar"
|
||||
Background="{TemplateBinding Background}"
|
||||
Cursor="Arrow"
|
||||
Grid.Column="1"
|
||||
Maximum="{TemplateBinding ScrollableHeight}"
|
||||
Minimum="0" Grid.Row="0"
|
||||
Value="{Binding VerticalOffset
|
||||
, Mode=OneWay
|
||||
, RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
||||
ViewportSize="{TemplateBinding ViewportHeight}"
|
||||
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
|
||||
<ScrollBar x:Name="PART_HorizontalScrollBar"
|
||||
AutomationProperties.AutomationId="HorizontalScrollBar"
|
||||
Background="{TemplateBinding Background}"
|
||||
Cursor="Arrow"
|
||||
Grid.Column="0"
|
||||
Maximum="{TemplateBinding ScrollableWidth}"
|
||||
Minimum="0"
|
||||
Orientation="Horizontal"
|
||||
Grid.Row="1"
|
||||
Value="{Binding HorizontalOffset
|
||||
, Mode=OneWay
|
||||
, RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
||||
ViewportSize="{TemplateBinding ViewportWidth}"
|
||||
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,879 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="primary" Color="#007DA3" />
|
||||
<SolidColorBrush x:Key="onPrimary" Color="#F6FAFE" />
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_surfaceContainer}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource md_theme_surfaceContainerHighest_highContrast}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onSurface}"/>
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="BorderThickness" Value="0 0 0 3"/>
|
||||
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||
<Setter Property="AllowDrop" Value="True"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="Margin" Value="10 10 10 0"/>
|
||||
<Setter Property="Padding" Value="10 17 10 5"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||
<Border x:Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="3"
|
||||
SnapsToDevicePixels="True">
|
||||
<Grid>
|
||||
<CheckBox x:Name="hasValue"
|
||||
IsChecked="True"
|
||||
Visibility="Collapsed" />
|
||||
<ScrollViewer x:Name="PART_ContentHost"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Focusable="False"
|
||||
HorizontalScrollBarVisibility="Hidden"
|
||||
VerticalScrollBarVisibility="Hidden"/>
|
||||
<TextBlock x:Name="label"
|
||||
FontSize="13"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
HorizontalAlignment="Left"
|
||||
Opacity=".5"
|
||||
Text="{TemplateBinding Tag}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="11 1 0 0"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Text" Value="">
|
||||
<Setter Property="IsChecked" TargetName="hasValue" Value="False"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" TargetName="border" Value="0.56"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsKeyboardFocused" Value="True">
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
<Setter Property="FontSize" TargetName="label" Value="10"/>
|
||||
<Setter Property="Margin" TargetName="label" Value="12 5 0 0"/>
|
||||
<Setter Property="VerticalAlignment" TargetName="label" Value="Top"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" SourceName="hasValue" Value="False">
|
||||
<Setter Property="FontSize" TargetName="label" Value="12"/>
|
||||
<Setter Property="VerticalAlignment" TargetName="label" Value="Center"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" SourceName="hasValue" Value="True">
|
||||
<Setter Property="FontSize" TargetName="label" Value="10"/>
|
||||
<Setter Property="Margin" TargetName="label" Value="12 5 0 0"/>
|
||||
<Setter Property="VerticalAlignment" TargetName="label" Value="Top"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsKeyboardFocused" Value="True"/>
|
||||
<Condition Property="IsChecked" SourceName="hasValue" Value="False"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="FontSize" TargetName="label" Value="10"/>
|
||||
<Setter Property="Margin" TargetName="label" Value="12 5 0 0"/>
|
||||
<Setter Property="VerticalAlignment" TargetName="label" Value="Top"/>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsInactiveSelectionHighlightEnabled" Value="True"/>
|
||||
<Condition Property="IsSelectionActive" Value="False"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="SelectionBrush"
|
||||
Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
|
||||
</MultiTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="FocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="2"
|
||||
StrokeDashArray="1 2"
|
||||
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
|
||||
SnapsToDevicePixels="True"
|
||||
StrokeThickness="1"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionMarkFocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="14,0,0,0"
|
||||
StrokeDashArray="1 2"
|
||||
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
|
||||
SnapsToDevicePixels="True"
|
||||
StrokeThickness="1"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type CheckBox}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onSurface}"/>
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="BorderThickness" Value="2"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type CheckBox}">
|
||||
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="checkBoxBorder"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="2"
|
||||
Height="15"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="2"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Width="15">
|
||||
<Path x:Name="optionMark"
|
||||
Data="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z"
|
||||
Fill="{DynamicResource md_theme_surfaceContainerHighest}"
|
||||
Stretch="Uniform"
|
||||
Margin="2"/>
|
||||
</Border>
|
||||
<ContentPresenter x:Name="contentPresenter"
|
||||
Grid.Column="1"
|
||||
Focusable="False"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="2"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="HasContent" Value="True">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}"/>
|
||||
<Setter Property="Padding" Value="4,0,0,0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="checkBoxBorder"
|
||||
Value="{DynamicResource md_theme_surfaceContainerHighest_highContrast}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="checkBoxBorder"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="Background"
|
||||
TargetName="checkBoxBorder"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="Fill"
|
||||
TargetName="optionMark"
|
||||
Value="{DynamicResource md_theme_onPrimary}"/>
|
||||
<Setter Property="Stroke"
|
||||
TargetName="optionMark"
|
||||
Value="{DynamicResource md_theme_onPrimary}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="checkBoxBorder"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="Background"
|
||||
TargetName="checkBoxBorder"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="Fill"
|
||||
TargetName="optionMark"
|
||||
Value="{DynamicResource md_theme_onPrimary}"/>
|
||||
<Setter Property="Stroke"
|
||||
TargetName="optionMark"
|
||||
Value="{DynamicResource md_theme_onPrimary}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="{x:Null}">
|
||||
<Setter Property="Background"
|
||||
TargetName="checkBoxBorder"
|
||||
Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
<Setter Property="Fill"
|
||||
TargetName="optionMark"
|
||||
Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type RadioButton}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onSurface}"/>
|
||||
<Setter Property="BorderThickness" Value="2"/>
|
||||
<Setter Property="Padding" Value="2"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RadioButton}">
|
||||
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="radioButtonBorder"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="16"
|
||||
Height="16"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="2"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Width="16">
|
||||
<Grid>
|
||||
<Border x:Name="optionMark"
|
||||
Background="{DynamicResource md_theme_surfaceContainerHighest}"
|
||||
CornerRadius="6"
|
||||
Width="6"
|
||||
Height="6"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ContentPresenter x:Name="contentPresenter"
|
||||
Grid.Column="1"
|
||||
Focusable="False"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="2"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="HasContent" Value="True">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}"/>
|
||||
<Setter Property="Padding" Value="4,-1,0,0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{DynamicResource md_theme_surfaceContainerHighest_highContrast}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" TargetName="radioButtonBorder" Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="Background" TargetName="optionMark" Value="{DynamicResource md_theme_onPrimary}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_primary}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="Background" TargetName="radioButtonBorder" Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="Background" TargetName="optionMark" Value="{DynamicResource md_theme_onPrimary}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_primary}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="{x:Null}">
|
||||
<Setter Property="Background" TargetName="radioButtonBorder" Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
<Setter Property="BorderBrush" TargetName="radioButtonBorder" Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
<Setter Property="Background" TargetName="optionMark" Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onBackground}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_background}"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
<Setter Property="FontSize" Value="11" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Top"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Label}">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="True">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Heading1" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onBackground}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_background}"/>
|
||||
<Setter Property="FontSize" Value="17"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Heading2" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onBackground}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_background}"/>
|
||||
<Setter Property="FontSize" Value="16"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Heading3" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onBackground}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_background}"/>
|
||||
<Setter Property="FontSize" Value="15"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Heading4" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onBackground}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_background}"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Heading5" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onBackground}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_background}"/>
|
||||
<Setter Property="FontSize" Value="13"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Lable" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onBackground}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_background}"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Button" TargetType="{x:Type Button}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onSurface}"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Padding" Value="20 7"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="Cursor" Value="Hand"/>
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="3"
|
||||
SnapsToDevicePixels="True">
|
||||
<ContentPresenter x:Name="contentPresenter"
|
||||
Focusable="False"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsDefaulted" Value="True">
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_surfaceContainerHighest}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_surfaceContainerHigh}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_surfaceContainerHigh}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_surfaceContainerHigh}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_surfaceContainerHigh}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_surfaceContainerLow}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_surfaceContainerLow}"/>
|
||||
<Setter Property="TextElement.Foreground"
|
||||
TargetName="contentPresenter"
|
||||
Value="{DynamicResource md_theme_surfaceContainerLow}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ButtonPrimary" TargetType="{x:Type Button}" BasedOn="{StaticResource Button}">
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onPrimary}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="3"
|
||||
SnapsToDevicePixels="True">
|
||||
<ContentPresenter x:Name="contentPresenter"
|
||||
Focusable="False"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsDefaulted" Value="True">
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_primaryContainer_mediumContrast}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_primaryContainer_mediumContrast}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_primaryContainer_mediumContrast}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_primaryContainer_mediumContrast}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_primary}"/>
|
||||
<Setter Property="TextElement.Foreground"
|
||||
TargetName="contentPresenter"
|
||||
Value="{DynamicResource md_theme_onPrimary}"/>
|
||||
<Setter Property="Opacity" Value="0.8"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ButtonSecondary" TargetType="{x:Type Button}" BasedOn="{StaticResource Button}">
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_secondary}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource md_theme_secondary}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onSecondary}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="3"
|
||||
SnapsToDevicePixels="True">
|
||||
<ContentPresenter x:Name="contentPresenter"
|
||||
Focusable="False"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsDefaulted" Value="True">
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_secondary}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_secondaryContainer_mediumContrast}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_secondaryContainer_mediumContrast}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_secondaryContainer_mediumContrast}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_secondaryContainer_mediumContrast}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_secondary}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_secondary}"/>
|
||||
<Setter Property="TextElement.Foreground"
|
||||
TargetName="contentPresenter"
|
||||
Value="{DynamicResource md_theme_onSecondary}"/>
|
||||
<Setter Property="Opacity" Value="0.8"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ButtonTertiary" TargetType="{x:Type Button}" BasedOn="{StaticResource Button}">
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_tertiary}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource md_theme_tertiary}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onTertiary}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="3"
|
||||
SnapsToDevicePixels="True">
|
||||
<ContentPresenter x:Name="contentPresenter"
|
||||
Focusable="False"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsDefaulted" Value="True">
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_tertiary}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_tertiaryContainer_mediumContrast}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_tertiaryContainer_mediumContrast}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_tertiaryContainer_mediumContrast}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_tertiaryContainer_mediumContrast}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_tertiary}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_tertiary}"/>
|
||||
<Setter Property="TextElement.Foreground"
|
||||
TargetName="contentPresenter"
|
||||
Value="{DynamicResource md_theme_onTertiary}"/>
|
||||
<Setter Property="Opacity" Value="0.8"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ButtonDanger" TargetType="{x:Type Button}" BasedOn="{StaticResource Button}">
|
||||
<Setter Property="Background" Value="{DynamicResource md_theme_error}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource md_theme_error}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onError}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="3"
|
||||
SnapsToDevicePixels="True">
|
||||
<ContentPresenter x:Name="contentPresenter"
|
||||
Focusable="False"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsDefaulted" Value="True">
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_error}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_errorContainer_mediumContrast}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_errorContainer_mediumContrast}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_errorContainer_mediumContrast}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_errorContainer_mediumContrast}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_error}"/>
|
||||
<Setter Property="BorderBrush"
|
||||
TargetName="border"
|
||||
Value="{DynamicResource md_theme_error}"/>
|
||||
<Setter Property="TextElement.Foreground"
|
||||
TargetName="contentPresenter"
|
||||
Value="{DynamicResource md_theme_onError}"/>
|
||||
<Setter Property="Opacity" Value="0.8"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="Width" Value="16"/>
|
||||
<Setter Property="Height" Value="16"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Border Background="Transparent"
|
||||
Height="16"
|
||||
Width="16"
|
||||
Padding="0 2 0 0">
|
||||
<Path x:Name="ExpandPath"
|
||||
Height="8"
|
||||
Width="8"
|
||||
Stretch="Uniform"
|
||||
Data="{StaticResource bi_chevron_right}"
|
||||
Fill="{DynamicResource md_theme_onBackground}"
|
||||
Stroke="{DynamicResource md_theme_onBackground}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center">
|
||||
<Path.RenderTransform>
|
||||
<RotateTransform Angle="0" CenterY="3" CenterX="3"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="RenderTransform" TargetName="ExpandPath">
|
||||
<Setter.Value>
|
||||
<RotateTransform Angle="90" CenterY="4" CenterX="4"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Margin"
|
||||
TargetName="ExpandPath"
|
||||
Value="0 3 0 0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsMouseOver" Value="True"/>
|
||||
<Condition Property="IsChecked" Value="True"/>
|
||||
</MultiTrigger.Conditions>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TreeViewItemFocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type TreeViewItem}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Top"/>
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onBackground}"/>
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource TreeViewItemFocusVisual}"/>
|
||||
<Setter Property="Padding" Value="5 3" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border x:Name="Bd"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="3"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="True">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="20" Width="Auto"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton x:Name="Expander"
|
||||
ClickMode="Press"
|
||||
Grid.Column="0"
|
||||
IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource Mode=TemplatedParent}}"
|
||||
Style="{StaticResource ExpandCollapseToggleStyle}"/>
|
||||
<ContentPresenter x:Name="PART_Header"
|
||||
ContentSource="Header"
|
||||
Grid.Column="2"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ItemsPresenter x:Name="ItemsHost"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="1"
|
||||
Margin="10 0 0 0"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="False">
|
||||
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="HasItems" Value="False">
|
||||
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" TargetName="Bd" Value="{StaticResource md_theme_surfaceContainer}"/>
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="True"/>
|
||||
<Condition Property="IsSelectionActive" Value="False"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{StaticResource md_theme_surfaceContainer}"/>
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="VirtualizingPanel.IsVirtualizing" Value="True">
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type TreeView}">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="2"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="FontFamily" Value="Verdana"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource md_theme_onBackground}"/>
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TreeView}">
|
||||
<Border x:Name="Bd"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
SnapsToDevicePixels="True">
|
||||
<ScrollViewer x:Name="_tv_scrollviewer_"
|
||||
Background="{TemplateBinding Background}"
|
||||
CanContentScroll="False" Focusable="False"
|
||||
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||
<ItemsPresenter/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background"
|
||||
TargetName="Bd" Value="{DynamicResource md_theme_background}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="VirtualizingPanel.IsVirtualizing" Value="True">
|
||||
<Setter Property="CanContentScroll" TargetName="_tv_scrollviewer_" Value="True"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="VirtualizingPanel.IsVirtualizing" Value="True">
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel/>
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Common.GUI.ViewModels.Base
|
||||
{
|
||||
using Common.GUI.Models.Base;
|
||||
|
||||
public class ArgsVM : VM
|
||||
{
|
||||
protected readonly Arguments arguments;
|
||||
|
||||
public ArgsVM(Arguments arguments)
|
||||
=> this.arguments = arguments;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Common.GUI.ViewModels.Base
|
||||
{
|
||||
using Common.GUI.Models.Base;
|
||||
|
||||
public class ArgsVM<T> : VM<T> where T : ArgsVM<T>
|
||||
{
|
||||
protected readonly Arguments arguments;
|
||||
|
||||
public ArgsVM(Arguments arguments)
|
||||
=> this.arguments = arguments;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
namespace Common.GUI.ViewModels.Base
|
||||
{
|
||||
using Common.GUI.ViewModels.Controls;
|
||||
|
||||
using System;
|
||||
|
||||
public class MessageHandler
|
||||
{
|
||||
public event Action<MessageVM> MessageReceived;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,13 @@
|
||||
namespace Common.GUI.ViewModels.Base
|
||||
{
|
||||
using Common.GUI.Models.Base;
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
public class VM : INotifyPropertyChanged, IDisposable
|
||||
{
|
||||
public VM()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
public virtual void Dispose()
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
namespace Common.GUI.ViewModels.Controls
|
||||
{
|
||||
using Common.GUI.Models.Base;
|
||||
using Common.GUI.ViewModels.Base;
|
||||
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
public class MainLayoutVM : VM<MainLayoutVM>
|
||||
{
|
||||
private readonly MessageHandler messageHandler;
|
||||
|
||||
public MainLayoutVM(MessageHandler messageHandler)
|
||||
{
|
||||
this.messageHandler = messageHandler;
|
||||
this.messageHandler.MessageReceived += this.MessageReceived;
|
||||
this.Messages = new ObservableCollection<MessageVM>();
|
||||
}
|
||||
|
||||
public ObservableCollection<MessageVM> Messages { get; }
|
||||
|
||||
private void MessageReceived(MessageVM message)
|
||||
=> this.Messages.Add(message);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
namespace Common.GUI.ViewModels.Controls
|
||||
{
|
||||
using Common.GUI.ViewModels.Base;
|
||||
|
||||
using System;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
public class MainMenuVM : VM<MainMenuVM>
|
||||
{
|
||||
public MainMenuVM()
|
||||
=> this.NavigateCommand = new Command<string>(this.NavigateCommandHandler);
|
||||
|
||||
public ICommand NavigateCommand { get; }
|
||||
|
||||
private void NavigateCommandHandler(string page)
|
||||
{
|
||||
if (App.Current.MainWindow is NavigationWindow navigationWindow)
|
||||
{
|
||||
navigationWindow.Navigate(new Uri(page, UriKind.Relative));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace Common.GUI.ViewModels.Controls
|
||||
{
|
||||
using Common.GUI.ViewModels.Base;
|
||||
|
||||
public class MessageVM : VM<MessageVM>
|
||||
{
|
||||
public MessageVM(string title, string message)
|
||||
{
|
||||
this.Title = title;
|
||||
this.Message = message;
|
||||
}
|
||||
|
||||
public string Title { get; }
|
||||
|
||||
public string Message { get; }
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,11 @@
|
||||
{
|
||||
private readonly EregisterFeatures features = new EregisterFeatures();
|
||||
|
||||
public EregisterFeaturesVM()
|
||||
{
|
||||
this.InitializeEregisterManualProgrammingVM();
|
||||
}
|
||||
|
||||
private void InitializeEregisterManualProgrammingVM()
|
||||
{
|
||||
var features = new SortedDictionary<bool, SortedDictionary<string, SortedDictionary<string, FeatureDictionary>>>();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
public class EregisterManualProgrammingVM : VM<EregisterManualProgrammingVM>
|
||||
{
|
||||
public EregisterManualProgrammingVM()
|
||||
public EregisterManualProgrammingVM()
|
||||
{
|
||||
this.ItemsSource = new EregisterFeaturesVM();
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Common.GUI.ViewModels.Pages
|
||||
{
|
||||
using Common.GUI.ViewModels.Base;
|
||||
|
||||
public class MainPageVM : VM<MainPageVM>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
namespace Common.GUI.ViewModels
|
||||
{
|
||||
using Common.GUI.ViewModels.Base;
|
||||
using Common.GUI.ViewModels.Controls;
|
||||
using Common.GUI.ViewModels.Eregister;
|
||||
using Common.GUI.ViewModels.Pages;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using System.Windows;
|
||||
|
||||
public class VMLocator
|
||||
{
|
||||
private static readonly ServiceProvider serviceProvider = ConfigureServices();
|
||||
|
||||
public VMLocator() => App.Current.Exit += this.App_Exit;
|
||||
|
||||
public MainLayoutVM MainLayoutVM => serviceProvider.GetService<MainLayoutVM>();
|
||||
|
||||
public MainMenuVM MainMenuVM => serviceProvider.GetService<MainMenuVM>();
|
||||
|
||||
public MainPageVM MainPageVM => serviceProvider.GetService<MainPageVM>();
|
||||
|
||||
public EregisterManualProgrammingVM EregisterManualProgrammingVM => serviceProvider.GetService<EregisterManualProgrammingVM>();
|
||||
|
||||
private void App_Exit(object sender, ExitEventArgs args)
|
||||
{
|
||||
App.Current.Exit -= this.App_Exit;
|
||||
|
||||
serviceProvider.Dispose();
|
||||
}
|
||||
|
||||
private static ServiceProvider ConfigureServices()
|
||||
=> new ServiceCollection()
|
||||
.AddScoped<MessageHandler>()
|
||||
.AddTransient<MainLayoutVM>()
|
||||
.AddTransient<MainMenuVM>()
|
||||
.AddScoped<MainPageVM>()
|
||||
.AddScoped<EregisterManualProgrammingVM>()
|
||||
.BuildServiceProvider();
|
||||
}
|
||||
}
|
||||
@@ -1 +1,26 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 275.27 123.65"><defs><style>.cls-1{fill:#71d54c;}.cls-2{fill:#003895;}.cls-3{fill:#078ab1;}</style></defs><title>sensus_xylem_logo</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><rect class="cls-1" x="47.04" width="37.99" height="7.14"/><rect class="cls-1" x="47.04" y="11.65" width="37.99" height="7.14"/><rect class="cls-1" x="47.04" y="23.29" width="37.99" height="7.14"/><path class="cls-2" d="M124.94,35h-22.3c-7.14,0-9.31,2.08-9.31,8.9v27.5h9.14V42.71h22.64V71.36h9.14V43.86c0-6.82-2.18-8.9-9.31-8.9"/><path class="cls-2" d="M219.87,35V63.61H197.23V35h-9.14v27.5c0,6.82,2.18,8.9,9.31,8.9h22.3c7.14,0,9.31-2.08,9.31-8.9V35Z"/><path class="cls-2" d="M55.38,35c-6.82,0-8.91,2.18-8.91,9.31V62.05c0,7.14,2.08,9.31,8.91,9.31H85V63.61H55v-7H85V49.2H55v-7H85V35Z"/><path class="cls-2" d="M38.4,42.23V35H9.31C2.18,35,0,37,0,43.86v3.89c0,6.82,2.18,8.9,9.31,8.9H30.78v7H0v7.75H29.76c7.1,0,9.38-2.16,9.38-8.9V57.61c0-6.74-2.28-8.9-9.38-8.9H8.3V42.23Z"/><path class="cls-2" d="M179.92,42.23V35H150.83c-7.14,0-9.32,2.08-9.32,8.9v3.89c0,6.82,2.18,8.9,9.32,8.9h21.46v7H141.52v7.75h29.76c7.1,0,9.38-2.16,9.38-8.9V57.61c0-6.74-2.28-8.9-9.38-8.9H149.82V42.23Z"/><path class="cls-2" d="M274.53,42.23V35H245.44c-7.14,0-9.31,2.08-9.31,8.9v3.89c0,6.82,2.17,8.9,9.31,8.9H266.9v7H236.13v7.75h29.75c7.1,0,9.39-2.16,9.39-8.9V57.61c0-6.74-2.28-8.9-9.39-8.9H244.43V42.23Z"/><path class="cls-3" d="M68.21,103.11c0-3-1.66-4.54-4.69-4.54a7.49,7.49,0,0,0-5.23,2.07l-1.42-1.7a9.79,9.79,0,0,1,6.9-2.51c3.8,0,6.84,2.1,6.84,6.38v7.7a23.25,23.25,0,0,0,.3,4h-2.3a19,19,0,0,1-.26-2.86h-.06a7,7,0,0,1-6.38,3.31c-2.67,0-6.1-1.43-6.1-5.33,0-5.42,6-5.9,12.4-5.9Zm-.75,2.55c-4.16,0-9,.46-9,3.8,0,2.51,2.13,3.33,4.13,3.33A5.48,5.48,0,0,0,68.21,107v-1.31Z"/><path class="cls-3" d="M190.39,111.47v3h-2.55V86.07h2.55V99.92h.07a8,8,0,0,1,6.65-3.49c5.49,0,9.09,4.05,9.09,9.23s-3.6,9.24-9.09,9.24a8.08,8.08,0,0,1-6.65-3.43Zm6.47-12.91a7.09,7.09,0,0,0,0,14.16c4.22,0,6.64-3.15,6.64-7.06s-2.41-7.09-6.64-7.09"/><path class="cls-3" d="M209.09,96.87h2.46c.06.95.15,2.25.15,3h.07a6.25,6.25,0,0,1,5.64-3.45,6.58,6.58,0,0,1,1.68.18l-.34,2.4a6.89,6.89,0,0,0-1.8-.22c-2.7,0-5.15,2-5.15,6.65v9h-2.55V100.74c0-.94,0-2.66-.16-3.87"/><path class="cls-3" d="M232.09,103.11c0-3-1.66-4.54-4.69-4.54a7.46,7.46,0,0,0-5.23,2.07l-1.41-1.7a9.74,9.74,0,0,1,6.89-2.51c3.8,0,6.84,2.1,6.84,6.38v7.7a24.22,24.22,0,0,0,.31,4h-2.3a18.26,18.26,0,0,1-.26-2.86h-.07a7.05,7.05,0,0,1-6.39,3.31c-2.66,0-6.07-1.43-6.07-5.33,0-5.42,6-5.9,12.39-5.9Zm-.75,2.55c-4.18,0-9,.46-9,3.8,0,2.51,2.14,3.33,4.13,3.33a5.48,5.48,0,0,0,5.64-5.82v-1.31Z"/><path class="cls-3" d="M241.1,96.87c.06.95.16,2.25.16,3h.07a6.85,6.85,0,0,1,6-3.45c4.47,0,6.68,2.89,6.68,7.25v10.78h-2.55v-9.73c0-3.67-1.08-6.16-4.77-6.16-2.69,0-5.33,2.18-5.33,6.87v9h-2.55V100.74c0-.94,0-2.66-.14-3.87Z"/><path class="cls-3" d="M266,114.9c-5.49,0-9.09-4.06-9.09-9.24s3.59-9.23,9.09-9.23a8,8,0,0,1,6.65,3.49h.07V86.07h2.55v28.39h-2.55v-3h-.07A8.1,8.1,0,0,1,266,114.9m.27-2.18a6.71,6.71,0,0,0,6.75-7.06c0-4-2.81-7.09-6.75-7.09-4.24,0-6.64,3.19-6.64,7.09s2.4,7.06,6.64,7.06"/><path class="cls-3" d="M176.07,111.18v3.28h-1.85c-3.13,0-4.65-1.63-4.65-5.28v-5.72c0-1.79-.56-3.63-2.82-3.63s-3,1.84-3,3.63v11h-4v-11c0-1.79-.78-3.63-3.09-3.63s-3.06,1.84-3.06,3.63v11h-3.92V103.32c0-4.35,2.8-7,7-7a6.78,6.78,0,0,1,5.09,2.06,6.77,6.77,0,0,1,5.08-2.06c3.85,0,6.59,2.48,6.59,7v5.91c0,1.35.62,1.95,1.76,1.95Zm-30.61.47a11.42,11.42,0,0,1-7.74,3.07c-5.88,0-9.35-3.82-9.35-9.22s3.73-9.23,9-9.23c5.48,0,8.82,4.25,8.82,9.53,0,.66-.05,1.33-.05,1.33h-13.7c.51,2.59,2.1,4.22,5.28,4.22a7.37,7.37,0,0,0,5.21-2.17Zm-13-7.63h9.73c-.45-2.66-2.2-4.39-4.78-4.39s-4.39,1.79-5,4.39M120,109c0,3.83,1.58,5.42,4.83,5.42h1.78v-3.37h-.84c-1.2,0-1.87-.59-1.87-2.05V86.95H120Zm-10.95,2H109c-1,0-1.55-1.49-2.54-4.18l-1.64-4.52c-1.54-4.21-3.1-6.11-6.66-6.11-3,0-4.52,1.81-6.38,4.32L90.4,102.4,86,96.56H81.39l6.69,8.77-2.61,3.51c-1.34,1.8-2.16,2.34-3.31,2.34h-.78v3.28h1.67a4.91,4.91,0,0,0,4.41-2.27l2.86-4,4.6,6.29h4.69l-7-9.21,1.74-2.3c1.58-2.11,2.33-3.12,3.67-3.12s2.12,1.31,3.32,4.36l2,5.09c1.15,3,2.26,5.17,4.29,5.17h.26l-1,2.58c-.8,2-1.56,3.28-3.67,3.28h-.92v3.33h1.34c3.13,0,5.36-1.54,6.81-5.59l7.73-21.51H114Z"/></g></g></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 275.27 123.65">
|
||||
<defs>
|
||||
<style>.cls-1{fill:#71d54c;}.cls-2{fill:#003895;}.cls-3{fill:#078ab1;}</style>
|
||||
</defs>
|
||||
<title>sensus_xylem_logo</title>
|
||||
<g id="Layer_2" data-name="Layer 2">
|
||||
<g id="Layer_1-2" data-name="Layer 1">
|
||||
<rect class="cls-1" x="47.04" width="37.99" height="7.14"/>
|
||||
<rect class="cls-1" x="47.04" y="11.65" width="37.99" height="7.14"/>
|
||||
<rect class="cls-1" x="47.04" y="23.29" width="37.99" height="7.14"/>
|
||||
<path class="cls-2" d="M124.94,35h-22.3c-7.14,0-9.31,2.08-9.31,8.9v27.5h9.14V42.71h22.64V71.36h9.14V43.86c0-6.82-2.18-8.9-9.31-8.9"/>
|
||||
<path class="cls-2" d="M219.87,35V63.61H197.23V35h-9.14v27.5c0,6.82,2.18,8.9,9.31,8.9h22.3c7.14,0,9.31-2.08,9.31-8.9V35Z"/>
|
||||
<path class="cls-2" d="M55.38,35c-6.82,0-8.91,2.18-8.91,9.31V62.05c0,7.14,2.08,9.31,8.91,9.31H85V63.61H55v-7H85V49.2H55v-7H85V35Z"/>
|
||||
<path class="cls-2" d="M38.4,42.23V35H9.31C2.18,35,0,37,0,43.86v3.89c0,6.82,2.18,8.9,9.31,8.9H30.78v7H0v7.75H29.76c7.1,0,9.38-2.16,9.38-8.9V57.61c0-6.74-2.28-8.9-9.38-8.9H8.3V42.23Z"/>
|
||||
<path class="cls-2" d="M179.92,42.23V35H150.83c-7.14,0-9.32,2.08-9.32,8.9v3.89c0,6.82,2.18,8.9,9.32,8.9h21.46v7H141.52v7.75h29.76c7.1,0,9.38-2.16,9.38-8.9V57.61c0-6.74-2.28-8.9-9.38-8.9H149.82V42.23Z"/>
|
||||
<path class="cls-2" d="M274.53,42.23V35H245.44c-7.14,0-9.31,2.08-9.31,8.9v3.89c0,6.82,2.17,8.9,9.31,8.9H266.9v7H236.13v7.75h29.75c7.1,0,9.39-2.16,9.39-8.9V57.61c0-6.74-2.28-8.9-9.39-8.9H244.43V42.23Z"/>
|
||||
<path class="cls-3" d="M68.21,103.11c0-3-1.66-4.54-4.69-4.54a7.49,7.49,0,0,0-5.23,2.07l-1.42-1.7a9.79,9.79,0,0,1,6.9-2.51c3.8,0,6.84,2.1,6.84,6.38v7.7a23.25,23.25,0,0,0,.3,4h-2.3a19,19,0,0,1-.26-2.86h-.06a7,7,0,0,1-6.38,3.31c-2.67,0-6.1-1.43-6.1-5.33,0-5.42,6-5.9,12.4-5.9Zm-.75,2.55c-4.16,0-9,.46-9,3.8,0,2.51,2.13,3.33,4.13,3.33A5.48,5.48,0,0,0,68.21,107v-1.31Z"/>
|
||||
<path class="cls-3" d="M190.39,111.47v3h-2.55V86.07h2.55V99.92h.07a8,8,0,0,1,6.65-3.49c5.49,0,9.09,4.05,9.09,9.23s-3.6,9.24-9.09,9.24a8.08,8.08,0,0,1-6.65-3.43Zm6.47-12.91a7.09,7.09,0,0,0,0,14.16c4.22,0,6.64-3.15,6.64-7.06s-2.41-7.09-6.64-7.09"/>
|
||||
<path class="cls-3" d="M209.09,96.87h2.46c.06.95.15,2.25.15,3h.07a6.25,6.25,0,0,1,5.64-3.45,6.58,6.58,0,0,1,1.68.18l-.34,2.4a6.89,6.89,0,0,0-1.8-.22c-2.7,0-5.15,2-5.15,6.65v9h-2.55V100.74c0-.94,0-2.66-.16-3.87"/>
|
||||
<path class="cls-3" d="M232.09,103.11c0-3-1.66-4.54-4.69-4.54a7.46,7.46,0,0,0-5.23,2.07l-1.41-1.7a9.74,9.74,0,0,1,6.89-2.51c3.8,0,6.84,2.1,6.84,6.38v7.7a24.22,24.22,0,0,0,.31,4h-2.3a18.26,18.26,0,0,1-.26-2.86h-.07a7.05,7.05,0,0,1-6.39,3.31c-2.66,0-6.07-1.43-6.07-5.33,0-5.42,6-5.9,12.39-5.9Zm-.75,2.55c-4.18,0-9,.46-9,3.8,0,2.51,2.14,3.33,4.13,3.33a5.48,5.48,0,0,0,5.64-5.82v-1.31Z"/>
|
||||
<path class="cls-3" d="M241.1,96.87c.06.95.16,2.25.16,3h.07a6.85,6.85,0,0,1,6-3.45c4.47,0,6.68,2.89,6.68,7.25v10.78h-2.55v-9.73c0-3.67-1.08-6.16-4.77-6.16-2.69,0-5.33,2.18-5.33,6.87v9h-2.55V100.74c0-.94,0-2.66-.14-3.87Z"/>
|
||||
<path class="cls-3" d="M266,114.9c-5.49,0-9.09-4.06-9.09-9.24s3.59-9.23,9.09-9.23a8,8,0,0,1,6.65,3.49h.07V86.07h2.55v28.39h-2.55v-3h-.07A8.1,8.1,0,0,1,266,114.9m.27-2.18a6.71,6.71,0,0,0,6.75-7.06c0-4-2.81-7.09-6.75-7.09-4.24,0-6.64,3.19-6.64,7.09s2.4,7.06,6.64,7.06"/>
|
||||
<path class="cls-3" d="M176.07,111.18v3.28h-1.85c-3.13,0-4.65-1.63-4.65-5.28v-5.72c0-1.79-.56-3.63-2.82-3.63s-3,1.84-3,3.63v11h-4v-11c0-1.79-.78-3.63-3.09-3.63s-3.06,1.84-3.06,3.63v11h-3.92V103.32c0-4.35,2.8-7,7-7a6.78,6.78,0,0,1,5.09,2.06,6.77,6.77,0,0,1,5.08-2.06c3.85,0,6.59,2.48,6.59,7v5.91c0,1.35.62,1.95,1.76,1.95Zm-30.61.47a11.42,11.42,0,0,1-7.74,3.07c-5.88,0-9.35-3.82-9.35-9.22s3.73-9.23,9-9.23c5.48,0,8.82,4.25,8.82,9.53,0,.66-.05,1.33-.05,1.33h-13.7c.51,2.59,2.1,4.22,5.28,4.22a7.37,7.37,0,0,0,5.21-2.17Zm-13-7.63h9.73c-.45-2.66-2.2-4.39-4.78-4.39s-4.39,1.79-5,4.39M120,109c0,3.83,1.58,5.42,4.83,5.42h1.78v-3.37h-.84c-1.2,0-1.87-.59-1.87-2.05V86.95H120Zm-10.95,2H109c-1,0-1.55-1.49-2.54-4.18l-1.64-4.52c-1.54-4.21-3.1-6.11-6.66-6.11-3,0-4.52,1.81-6.38,4.32L90.4,102.4,86,96.56H81.39l6.69,8.77-2.61,3.51c-1.34,1.8-2.16,2.34-3.31,2.34h-.78v3.28h1.67a4.91,4.91,0,0,0,4.41-2.27l2.86-4,4.6,6.29h4.69l-7-9.21,1.74-2.3c1.58-2.11,2.33-3.12,3.67-3.12s2.12,1.31,3.32,4.36l2,5.09c1.15,3,2.26,5.17,4.29,5.17h.26l-1,2.58c-.8,2-1.56,3.28-3.67,3.28h-.92v3.33h1.34c3.13,0,5.36-1.54,6.81-5.59l7.73-21.51H114Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.3 KiB |
Reference in New Issue
Block a user