Files
SzmediTools/Szmedi.RvKits/WPFUI.xaml
2026-02-23 11:21:51 +08:00

162 lines
11 KiB
XML

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Szmedi.RvKits.Controls"
xmlns:converters="clr-namespace:Szmedi.RvKits.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:db="clr-namespace:Autodesk.Revit.DB;assembly=RevitAPI"
xmlns:editor="clr-namespace:RoslynPad.Editor;assembly=RoslynPad.Editor.Windows"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes">
<ResourceDictionary.MergedDictionaries>
<!--<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/Internal/MaterialDesignTheme.BaseThemeColors.xaml" />-->
<!--<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Dark.xaml" />-->
<materialDesign:BundledTheme
BaseTheme="Dark"
PrimaryColor="Teal"
SecondaryColor="Green" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/Szmedi.RvKits;component/Controls/MaterialWindow.xaml" />
<!--<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Dark.xaml" />-->
<!--<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign2.Defaults.xaml" />-->
<!--<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign2.Defaults.xaml" />-->
<!--<ResourceDictionary Source="pack://application:,,,/MaterialDesignExtensions;component/Themes/Generic.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignExtensions;component/Themes/MaterialDesignDarkTheme.xaml" />-->
</ResourceDictionary.MergedDictionaries>
<!--<SolidColorBrush x:Key="PrimaryHueLightBrush" Color="#744CE0" />-->
<!--<FontFamily x:Key="SourceHanSansSC">pack://application:,,,/Szmedi.RvKits;component/Fonts/#Source Han Sans SC</FontFamily>-->
<!--#region Converters-->
<!--<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />-->
<!--<converters:InvertBooleanToVisibilityConverter x:Key="InvertBooleanToVisibilityConverter" />-->
<converters:ComparisonConverter x:Key="ComparisonConverter" />
<converters:SearchTypeValueConverter x:Key="SearchTypeValueConverter" />
<converters:SearchFamilyValueConverter x:Key="SearchFamilyValueConverter" />
<converters:IntToBooleanConverter x:Key="IntToBooleanConverter" />
<!--<converters:InvertBooleanConverter x:Key="InvertBooleanConverter" />-->
<converters:ColorToBrushConverter x:Key="ColorToBrushConverter" />
<converters:RGBToBrushConverter x:Key="RGBToBrushConverter" />
<!--#endregion-->
<DrawingImage x:Key="Logo">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V1024 H1024 V0 H0 Z">
<DrawingGroup.Transform>
<TranslateTransform X="0" Y="5.8161029301118106E-05" />
</DrawingGroup.Transform>
<GeometryDrawing Brush="WhiteSmoke" Geometry="F1 M1024,1024z M0,0z M510.165334,556.416195C494.378674,556.416195,478.805347,557.226861,463.402687,558.762861L463.402687,465.280233A476.287802,476.287802,0,0,0,556.927981,465.280233L556.927981,558.720194C541.567987,557.226861,525.909327,556.416195,510.122667,556.416195z M701.823921,597.418844L701.823921,426.581582A467.626472,467.626472,0,0,0,977.621139,1.877759A1.877333,1.877333,0,0,0,975.743807,0.000427L834.517199,0.000427A1.877333,1.877333,0,0,0,832.7252,1.877759A322.133199,322.133199,0,0,1,701.866588,259.498985L701.866588,1.877759A1.877333,1.877333,0,0,0,699.946588,0.000427L558.719981,0.000427A1.877333,1.877333,0,0,0,556.885315,1.877759L556.885315,319.232294A324.309198,324.309198,0,0,1,463.36002,319.232294L463.36002,1.920426A1.834666,1.834666,0,0,0,461.568021,0.000427L320.341413,0.000427A1.877333,1.877333,0,0,0,318.506747,1.877759L318.506747,259.541652A322.133199,322.133199,0,0,1,187.562802,1.835093A1.877333,1.877333,0,0,0,185.728136,0.000427L44.544195,0.000427A1.877333,1.877333,0,0,0,42.666862,1.877759A467.626472,467.626472,0,0,0,318.506747,426.666916L318.506747,597.333511A467.626472,467.626472,0,0,0,42.666862,1022.122667C42.666862,1023.146667,43.520195,1024,44.544195,1024L185.770803,1024C186.752136,1024,187.562802,1023.146667,187.562802,1022.122667A322.133199,322.133199,0,0,1,318.549414,764.458775L318.549414,1022.122667C318.549414,1023.146667,319.36008,1024,320.38408,1024L461.568021,1024C462.592021,1024,463.402687,1023.146667,463.402687,1022.122667L463.402687,704.725466A325.717198,325.717198,0,0,1,556.927981,704.725466L556.927981,1022.122667C556.927981,1023.146667,557.781314,1024,558.805314,1024L699.989255,1024C701.013255,1024,701.823921,1023.146667,701.823921,1022.122667L701.823921,764.501441A322.133199,322.133199,0,0,1,832.7252,1022.122667C832.7252,1023.189333,833.535866,1024,834.559866,1024L975.743807,1024C976.767807,1024,977.62114,1023.146667,977.621139,1022.122667A467.626472,467.626472,0,0,0,701.866588,597.418844z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<!-- DataType="{x:Type db:ElementType}" -->
<DataTemplate x:Key="MultiDisplayMemberPath">
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0}:{1}">
<Binding Path="FamilyName" />
<Binding Path="Name" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</DataTemplate>
<Style x:Key="GroupHeaderStyle" TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander Header="{Binding Name}" IsExpanded="False">
<ItemsPresenter />
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style BasedOn="{StaticResource MaterialDesignRaisedButton}" TargetType="Button">
<Setter Property="Margin" Value="5" />
</Style>
<!--<Style BasedOn="{StaticResource MaterialDesignWindow}" TargetType="{x:Type Window}">
<Setter Property="FontFamily" Value="{StaticResource SourceHanSansSC}" />
-->
<!--<Setter Property="Background" Value="{DynamicResource MaterialDesign.Brush.Background}" />-->
<!--<Setter Property="TextElement.FontSize" Value="13" />-->
<!--<Setter Property="TextElement.FontWeight" Value="Regular" />-->
<!--<Setter Property="TextOptions.TextRenderingMode" Value="Auto" />-->
<!--<Setter Property="TextOptions.TextFormattingMode" Value="Ideal" />-->
<!--<Setter Property="TextElement.Foreground" Value="{DynamicResource MaterialDesign.Brush.Foreground}" />-->
<!--
<Setter Property="ShowInTaskbar" Value="False" />
<Setter Property="SizeToContent" Value="WidthAndHeight" />
</Style>-->
<Style BasedOn="{StaticResource MaterialWindowStyle}" TargetType="{x:Type controls:MaterialWindow}">
<Setter Property="Icon" Value="{StaticResource Logo}" />
<Setter Property="ShowInTaskbar" Value="False" />
<Setter Property="FontFamily" Value="Microsoft YaHei UI" />
</Style>
<Style TargetType="materialDesign:PackIcon">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<!--<Style BasedOn="{StaticResource MaterialDesignWindow}" TargetType="Window">
<Setter Property="FontFamily" Value="Microsoft YaHei UI" />
<Setter Property="SizeToContent" Value="WidthAndHeight" />
</Style>-->
<Style BasedOn="{StaticResource MaterialDesignDataGrid}" TargetType="DataGrid">
<Setter Property="Margin" Value="5" />
</Style>
<!--<Style TargetType="Page">
<Setter Property="TextElement.FontSize" Value="13" />
<Setter Property="TextElement.FontWeight" Value="Regular" />
<Setter Property="TextOptions.TextRenderingMode" Value="Auto" />
<Setter Property="TextOptions.TextFormattingMode" Value="Ideal" />
<Setter Property="Background" Value="{StaticResource MaterialDesign.Brush.Background}" />
<Setter Property="TextElement.Foreground" Value="{DynamicResource MaterialDesign.Brush.Foreground}" />
<Setter Property="FontFamily" Value="{StaticResource SourceHanSansSC}" />
</Style>-->
<Style BasedOn="{StaticResource MaterialDesignOutlinedTextBox}" TargetType="TextBox">
<Setter Property="Margin" Value="5" />
<Setter Property="Padding" Value="10" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="TextAlignment" Value="Center" />
<Setter Property="Validation.ErrorTemplate">
<Setter.Value>
<ControlTemplate>
<StackPanel>
<AdornedElementPlaceholder Name="Adorner" />
<TextBlock
HorizontalAlignment="Right"
Foreground="Red"
Text="{Binding ElementName=Adorner, Path=AdornedElement.(Validation.Errors)[0].ErrorContent}" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style BasedOn="{StaticResource MaterialDesignTextBlock}" TargetType="TextBlock">
<Setter Property="Margin" Value="5" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style BasedOn="{StaticResource MaterialDesignOutlinedComboBox}" TargetType="ComboBox">
<Setter Property="Margin" Value="5" />
<Setter Property="Padding" Value="10" />
</Style>
<Style BasedOn="{StaticResource MaterialDesignFlatPrimaryToggleButton}" TargetType="ToggleButton">
<Setter Property="Margin" Value="5" />
</Style>
<Style BasedOn="{StaticResource MaterialDesignRadioButton}" TargetType="RadioButton">
<Setter Property="Margin" Value="5" />
</Style>
<Style BasedOn="{StaticResource MaterialDesignCheckBox}" TargetType="CheckBox">
<Setter Property="Margin" Value="5" />
</Style>
<Style BasedOn="{StaticResource MaterialDesignListView}" TargetType="ListView">
<Setter Property="Margin" Value="5" />
</Style>
<Style BasedOn="{StaticResource MaterialDesignCardGroupBox}" TargetType="GroupBox">
<Setter Property="Margin" Value="5" />
</Style>
<Style BasedOn="{StaticResource MaterialDesignFilledTabControl}" TargetType="TabControl" />
<!--<Style BasedOn="{StaticResource MaterialWindowStyle}" TargetType="controls:MaterialWindow" />-->
</ResourceDictionary>