更新
This commit is contained in:
62
WPFDark/Controls/BiaColorPickerLightweightStyle.xaml
Normal file
62
WPFDark/Controls/BiaColorPickerLightweightStyle.xaml
Normal file
@@ -0,0 +1,62 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:colorPicker="clr-namespace:WPFDark.Controls"
|
||||
xmlns:wpf="clr-namespace:WPFDark">
|
||||
<Style x:Key="BiaColorPickerLightweightStyle" TargetType="{x:Type colorPicker:BiaColorPicker}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="4" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<colorPicker:BiaHsvBoxBackground Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
Margin="0,0,28,0"
|
||||
Value="{Binding Value,
|
||||
Mode=TwoWay,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type colorPicker:BiaColorPicker}}}"
|
||||
Hue="{Binding Hue,
|
||||
Mode=TwoWay,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type colorPicker:BiaColorPicker}}}"
|
||||
IsReadOnly="{Binding IsReadOnly,
|
||||
Mode=OneWay,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type colorPicker:BiaColorPicker}}}"
|
||||
Saturation="{Binding Saturation,
|
||||
Mode=TwoWay,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type colorPicker:BiaColorPicker}}}" />
|
||||
|
||||
<colorPicker:BiaHsvBoxCursor Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
Margin="0,0,28,0"
|
||||
Hue="{Binding Hue,
|
||||
Mode=OneWay,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type colorPicker:BiaColorPicker}}}"
|
||||
IsReadOnly="{Binding IsReadOnly,
|
||||
Mode=OneWay,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type colorPicker:BiaColorPicker}}}"
|
||||
Saturation="{Binding Saturation,
|
||||
Mode=OneWay,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type colorPicker:BiaColorPicker}}}" />
|
||||
|
||||
<colorPicker:BiaColorBar Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
Width="{x:Static wpf:Boxes.BasicOneLineHeight}"
|
||||
HorizontalAlignment="Right"
|
||||
Value="{Binding Value,
|
||||
Mode=TwoWay,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type colorPicker:BiaColorPicker}}}"
|
||||
IsInverseValue="True"
|
||||
IsReadOnly="{Binding IsReadOnly,
|
||||
Mode=OneWay,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type colorPicker:BiaColorPicker}}}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user