整理代码
This commit is contained in:
58
ShrlAlgoToolkit.RevitAddins/Windows/ColorPickerWin.xaml
Normal file
58
ShrlAlgoToolkit.RevitAddins/Windows/ColorPickerWin.xaml
Normal file
@@ -0,0 +1,58 @@
|
||||
<ui:FluentWindowEx
|
||||
x:Class="ShrlAlgo.RvKits.Windows.ColorPickerWin"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
|
||||
xmlns:local2="clr-namespace:ShrlAlgo.RvKits.Windows"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
|
||||
Title="颜色设置"
|
||||
Width="340"
|
||||
Height="390"
|
||||
d:DataContext="{d:DesignInstance Type=local2:ColorPickerViewModel}"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<!--<controls:StandardColorPicker
|
||||
x:Name="ColorPicker"
|
||||
Grid.ColumnSpan="2"
|
||||
SelectedColor="{Binding SelectedColor, Delay=25, UpdateSourceTrigger=PropertyChanged}">
|
||||
<b:Interaction.Triggers>
|
||||
<b:EventTrigger EventName="MouseLeftButtonUp">
|
||||
<b:InvokeCommandAction Command="{Binding UpdateColorCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=controls:ColorPicker}}" />
|
||||
</b:EventTrigger>
|
||||
</b:Interaction.Triggers>
|
||||
</controls:StandardColorPicker>-->
|
||||
<ui:ColorPicker
|
||||
x:Name="ColorPicker"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
SelectedColor="{Binding SelectedColor}" />
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Command="{Binding ConfirmCommand}"
|
||||
CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"
|
||||
Content="确定" />
|
||||
<Button Command="Close" Content="取消" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ui:FluentWindowEx>
|
||||
Reference in New Issue
Block a user