fix flickering mview hyperlink hover background
This commit is contained in:
1 parent
a0384c6d33
commit
a0e772885c
3 files changed
+19
-9
No files matched your search
@@ -268,6 +268,7 @@ namespace mbts.spark {
|
||||
void on_view_generated(HyperlinkCell cell_view) {
|
||||
cell_view.SetValue(ColumnKeyProperty, col_key);
|
||||
cell_view.SetValue(ColumnProperty, col);
|
||||
cell_view.SetBinding(GridProperty, new Binding { RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(DIYGrid), 1) });
|
||||
if (tooltip != null) {
|
||||
cell_view.ToolTip = tooltip;
|
||||
} else if (tooltip_binding != null) {
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
xmlns:c="clr-namespace:mbts.ui.controls"
|
||||
xmlns:cv="clr-namespace:mbts.ui.converters"
|
||||
xmlns:usp="clr-namespace:mbts.ui.spark"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
u:WindowStyle.UnsafeWindow="{Binding Path='(u:WindowStyle.UnsafeWindow)', RelativeSource={RelativeSource AncestorType=bv:SparkWindowView}}"
|
||||
FocusManager.IsFocusScope="True"
|
||||
Background="{StaticResource CommonBackground}"
|
||||
@@ -35,14 +34,16 @@
|
||||
<Trigger Property="IsMouseOverClickArea" Value="True">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush>
|
||||
<SolidColorBrush.Color>
|
||||
<MultiBinding Converter="{x:Static cv:ColorBlendMultiConverter.Instance}">
|
||||
<Binding Path="SelectionHighlight" RelativeSource="{RelativeSource AncestorType=c:DIYGrid}"/>
|
||||
<Binding Path="(c:DIYGrid.Column).background_color" RelativeSource="{RelativeSource AncestorType=c:HyperlinkCell}"/>
|
||||
</MultiBinding>
|
||||
</SolidColorBrush.Color>
|
||||
</SolidColorBrush>
|
||||
<MultiBinding>
|
||||
<MultiBinding.Converter>
|
||||
<cv:MultiValueConverterPipe>
|
||||
<cv:ColorBlendMultiConverter/>
|
||||
<cv:ColorToBrushConverter/>
|
||||
</cv:MultiValueConverterPipe>
|
||||
</MultiBinding.Converter>
|
||||
<Binding Path="(c:DIYGrid.Grid).SelectionHighlight" RelativeSource="{RelativeSource Self}"/>
|
||||
<Binding Path="(c:DIYGrid.Column).background_color" RelativeSource="{RelativeSource Self}"/>
|
||||
</MultiBinding>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="BorderBrush">
|
||||
|
||||
@@ -681,6 +681,14 @@ namespace mbts.ui.controls {
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Grid
|
||||
public static readonly DependencyProperty GridProperty =
|
||||
DependencyProperty.RegisterAttached("Grid", typeof(DIYGrid), typeof(DIYGrid));
|
||||
|
||||
public static DIYGrid GetGrid(DependencyObject d) => d.GetValue(GridProperty) as DIYGrid;
|
||||
public static void SetGrid(DependencyObject d, DIYGrid value) => d.SetValue(GridProperty, value);
|
||||
#endregion
|
||||
|
||||
#region ColumnKey
|
||||
public static readonly DependencyProperty ColumnKeyProperty =
|
||||
DependencyProperty.RegisterAttached("ColumnKey",
|
||||
|
||||
Reference in new issue
Block a user