PNLView - HyperlinkCell mouse hover animation

This commit is contained in:
John Colvin committed 2019-11-19 00:06:20 -06:00
1 parent 663bf5365f
commit dbeaf3b51f
1 file changed
+33
@@ -12,6 +12,7 @@
xmlns:sys="clr-namespace:System;assembly=mscorlib"
FocusManager.IsFocusScope="True"
Background="{StaticResource CommonBackground}"
Tag="{Binding ElementName=_grid}"
>
<UserControl.CommandBindings>
<CommandBinding Command="{x:Static pnl:PNLView.CellClickCommand}" Executed="_cell_click_executed"/>
@@ -350,6 +351,38 @@
<Setter Property="FontSize" Value="{Binding font_size}"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Text" Value="{Binding text}"/>
<Style.Triggers>
<Trigger Property="IsMouseOverClickArea" Value="True">
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush>
<SolidColorBrush.Color>
<MultiBinding Converter="{x:Static cv:ColorBlendMultiConverter.Instance}">
<!--Note: the Tag property serves as a proxy for the DIYGrid, because the header rows, unlike the regular rows/groups,
are not visual children of the DIYGrid, and cannot access the grid with a RelativeSource.-->
<Binding Path="(pnl:PNLView.Tag).(c:DIYGrid.SelectionHighlight)" RelativeSource="{RelativeSource AncestorType=pnl:PNLView}"/>
<Binding Path="DataContext.background" RelativeSource="{RelativeSource AncestorType=c:HyperlinkCell}"/>
</MultiBinding>
</SolidColorBrush.Color>
</SolidColorBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush">
<Setter.Value>
<Binding Path="(pnl:PNLView.Tag).(c:DIYGrid.SelectionHighlight)" RelativeSource="{RelativeSource AncestorType=pnl:PNLView}">
<Binding.Converter>
<cv:ValueConverterPipe>
<cv:ColorWithConverter A="255"/>
<cv:ColorToBrushConverter/>
</cv:ValueConverterPipe>
</Binding.Converter>
</Binding>
</Setter.Value>
</Setter>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Cursor" Value="Hand"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="RowHyperlinkCell" TargetType="c:HyperlinkCell" BasedOn="{StaticResource HyperlinkCellBase}">