PNLView.xaml - factor out common HyperlinkCell props into base style
This commit is contained in:
1 parent
7baa7ca8a1
commit
bc2eb65c0a
1 file changed
+23
-67
@@ -335,7 +335,22 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HyperlinkCell" TargetType="c:HyperlinkCell">
|
||||
<Style x:Key="HyperlinkCellBase" TargetType="c:HyperlinkCell">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="{Binding background}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="BorderBrush">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="{Binding border}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="{Binding foreground}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
|
||||
@@ -349,41 +364,13 @@
|
||||
</MultiBinding>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="c:DIYGrid.ObservedCachedColumnParams">
|
||||
<Setter.Value>
|
||||
<x:Array Type="{x:Type c:CachedColumnParam}">
|
||||
<c:CachedColumnParam SourcePropertyName="font_family" TargetProperty="c:HyperlinkCell.FontFamily"/>
|
||||
<c:CachedColumnParam SourcePropertyName="font_size" TargetProperty="c:HyperlinkCell.FontSize"/>
|
||||
<c:CachedColumnParam SourcePropertyName="font_brush" TargetProperty="c:HyperlinkCell.Foreground"/>
|
||||
<c:CachedColumnParam SourcePropertyName="horizontal_alignment" TargetProperty="c:HyperlinkCell.HorizontalContentAlignment"/>
|
||||
</x:Array>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="RowHyperlinkCell" TargetType="c:HyperlinkCell">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="{Binding background}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="{Binding foreground}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="BorderBrush">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="{Binding border}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Padding" Value="{x:Static c:DIYGrid.AnimatableCellPadding}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="FontWeight" Value="{Binding font_weight}"/>
|
||||
<Setter Property="FontSize" Value="{Binding font_size}"/>
|
||||
<Setter Property="Text" Value="{Binding text}"/>
|
||||
<Setter Property="Command" Value="{x:Static pnl:PNLView.CellClickCommand}"/>
|
||||
<Setter Property="CommandTarget" Value="{Binding RelativeSource={RelativeSource AncestorType=pnl:PNLView}}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="RowHyperlinkCell" TargetType="c:HyperlinkCell" BasedOn="{StaticResource HyperlinkCellBase}">
|
||||
<Setter Property="Padding" Value="{x:Static c:DIYGrid.AnimatableCellPadding}"/>
|
||||
<Setter Property="CommandParameter">
|
||||
<Setter.Value>
|
||||
<MultiBinding Converter="{x:Static pnl:PNLView.CellParamsConverter}">
|
||||
@@ -403,24 +390,9 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="HeaderRowHyperlinkCellBase" TargetType="c:HyperlinkCell">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="{Binding background}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="{Binding foreground}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style x:Key="HeaderRowHyperlinkCellBase" TargetType="c:HyperlinkCell" BasedOn="{StaticResource HyperlinkCellBase}">
|
||||
<Setter Property="Margin" Value="0,0,0,1"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="FontWeight" Value="{Binding font_weight}"/>
|
||||
<Setter Property="FontSize" Value="{Binding font_size}"/>
|
||||
<Setter Property="Text" Value="{Binding text}"/>
|
||||
<Setter Property="Command" Value="{x:Static pnl:PNLView.CellClickCommand}"/>
|
||||
<Setter Property="CommandTarget" Value="{Binding RelativeSource={RelativeSource AncestorType=pnl:PNLView}}"/>
|
||||
<Setter Property="c:DIYGrid.ObservedCachedColumnParams">
|
||||
<Setter.Value>
|
||||
<x:Array Type="{x:Type c:CachedColumnParam}">
|
||||
@@ -454,23 +426,7 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="GroupRowHyperlinkCell" TargetType="c:HyperlinkCell">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="{Binding background}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="{Binding foreground}"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="FontWeight" Value="{Binding font_weight}"/>
|
||||
<Setter Property="FontSize" Value="{Binding font_size}"/>
|
||||
<Setter Property="Text" Value="{Binding text}"/>
|
||||
<Setter Property="Command" Value="{x:Static pnl:PNLView.CellClickCommand}"/>
|
||||
<Setter Property="CommandTarget" Value="{Binding RelativeSource={RelativeSource AncestorType=pnl:PNLView}}"/>
|
||||
<Style x:Key="GroupRowHyperlinkCell" TargetType="c:HyperlinkCell" BasedOn="{StaticResource HyperlinkCellBase}">
|
||||
<Setter Property="CommandParameter">
|
||||
<Setter.Value>
|
||||
<MultiBinding Converter="{x:Static pnl:PNLView.CellParamsConverter}">
|
||||
@@ -1217,4 +1173,4 @@
|
||||
<Rectangle Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="1" Fill="Gray"/>
|
||||
</Grid>
|
||||
</AdornerDecorator>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
Reference in new issue
Block a user