111 lines
5.9 KiB
XML
111 lines
5.9 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:converters="clr-namespace:ShrlAlgoToolkit.RevitAddins.Common.Converters"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:familyLibrary="clr-namespace:ShrlAlgoToolkit.RevitAddins.RvFamily.FamilyLibrary"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:ui="https://github.com/ShrlAlgo/Melskin"
|
|
mc:Ignorable="d">
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/Melskin;component/Themes/Light.xaml" />
|
|
<ResourceDictionary Source="pack://application:,,,/Melskin;component/Themes/Accents/LightBlue.xaml" />
|
|
<ResourceDictionary Source="pack://application:,,,/Melskin;component/Themes/Styles.xaml" />
|
|
<!--<ui:ThemesDictionary Mode="Light" Palette="Blue"/>
|
|
<ui:ControlsDictionary/>-->
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<DrawingImage x:Key="RevitIcon">
|
|
<DrawingImage.Drawing>
|
|
<DrawingGroup ClipGeometry="M0,0 V1024 H1024 V0 H0 Z">
|
|
<GeometryDrawing Brush="{StaticResource PrimaryNormalBrush}" Geometry="F1 M1024,1024z M0,0z M147.57410069,932.61836445L314.14081146,991.97489891 375.974892,709.90466761 835.6562197,962.38109348 908.96101687,868.04933043 582.75346283,511.86185991 706.09986469,484.28709367 716.07440089,361.97032139 499.04779847,40.3156604999999 270.05979659,173.79747816 147.57410069,932.61836445z" />
|
|
</DrawingGroup>
|
|
</DrawingImage.Drawing>
|
|
</DrawingImage>
|
|
<!--<SolidColorBrush x:Key="PrimaryHueLightBrush" Color="#744CE0" />-->
|
|
<!--<ObjectDataProvider
|
|
x:Key="DetailLevelEnumKey"
|
|
MethodName="GetValues"
|
|
ObjectType="{x:Type core:Enum}">
|
|
<ObjectDataProvider.MethodParameters>
|
|
<x:Type Type="db:ViewDetailLevel" />
|
|
</ObjectDataProvider.MethodParameters>
|
|
</ObjectDataProvider>-->
|
|
|
|
<!--#region Converters-->
|
|
<ui:InvertBooleanConverter x:Key="InvertBooleanConverter" />
|
|
<converters:ColorToBrushConverter x:Key="ColorToBrushConverter" />
|
|
<converters:ComparisonConverter x:Key="ComparisonConverter" />
|
|
<!--#endregion-->
|
|
|
|
<DataTemplate x:Key="FamilyGalleryItemTemplate" DataType="{x:Type familyLibrary:FamilyModel}">
|
|
<Grid>
|
|
<Button
|
|
Command="{Binding PlaceRecentFamilyCommand}"
|
|
CommandParameter="{Binding}"
|
|
ToolTip="{Binding ToolTip}">
|
|
<!--<Button.ContextMenu>
|
|
<ContextMenu>
|
|
<MenuItem
|
|
Command="{Binding RemoveRecentFamilyCommand}"
|
|
CommandParameter="{Binding}"
|
|
Header="移除" />
|
|
</ContextMenu>
|
|
</Button.ContextMenu>-->
|
|
<Button.Style>
|
|
<Style TargetType="{x:Type Button}">
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Height" Value="56" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Grid Margin="0" Background="#01000000">
|
|
<Border
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
BorderBrush="Black"
|
|
BorderThickness="1">
|
|
<Image
|
|
Name="Image"
|
|
Width="{TemplateBinding Width}"
|
|
Height="{TemplateBinding Height}"
|
|
Source="{Binding BitmapImage}"
|
|
Stretch="Fill" />
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Image" Property="RenderTransform">
|
|
<Setter.Value>
|
|
<ScaleTransform CenterX="28" CenterY="28" ScaleX="1.1" ScaleY="1.1" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="Image" Property="RenderTransform">
|
|
<Setter.Value>
|
|
<ScaleTransform CenterX="28" CenterY="28" ScaleX="1" ScaleY="1" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<EventTrigger RoutedEvent="Click" />
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Width" Value="56" />
|
|
</Style>
|
|
</Button.Style>
|
|
</Button>
|
|
</Grid>
|
|
</DataTemplate>
|
|
<DataTemplate x:Key="MultiDisplayMemberPath">
|
|
<TextBlock>
|
|
<TextBlock.Text>
|
|
<MultiBinding StringFormat="{}{0} - {1}">
|
|
<Binding Path="FamilyName" />
|
|
<Binding Path="Name" />
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</DataTemplate>
|
|
</ResourceDictionary> |