From 596d800cfbdc630d50d2d6465a1927eb38ed5f0a Mon Sep 17 00:00:00 2001 From: Jake Norbut Date: Thu, 29 Aug 2019 09:08:51 -0500 Subject: [PATCH] hover effect is not enabled by default for regular Hyperlink Column; MVHyperlink Column enables hover effect --- .../Columns/FrameworkElementColumns/HyperlinkColumn.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/client/spark/view/Controls/DIYGrid/Columns/FrameworkElementColumns/HyperlinkColumn.cs b/src/client/spark/view/Controls/DIYGrid/Columns/FrameworkElementColumns/HyperlinkColumn.cs index 74496d396..dc1275255 100644 --- a/src/client/spark/view/Controls/DIYGrid/Columns/FrameworkElementColumns/HyperlinkColumn.cs +++ b/src/client/spark/view/Controls/DIYGrid/Columns/FrameworkElementColumns/HyperlinkColumn.cs @@ -14,19 +14,21 @@ namespace mbts.ui.controls { readonly BindingBase _binding, _command_binding; public HyperlinkElementColumn( - TKey key, BindingBase binding, BindingBase command_binding, IDataGridColumnFilter filter, string filter_template) : base(key) { + TKey key, BindingBase binding, BindingBase command_binding, IDataGridColumnFilter filter, string filter_template, bool enable_hover_effect = false) : base(key) { this.filter = filter; this.filter_template = filter_template; _binding = binding; _command_binding = command_binding; + this.enable_hover_effect = enable_hover_effect; } public IDataGridColumnFilter filter { get; } public string filter_template { get; } public Thickness padding { get; set; } = _default_padding; - + public bool enable_hover_effect { get; set; } + public override FrameworkElement view_factory() { - var hl = new HyperlinkCell { Padding = padding }; + var hl = new HyperlinkCell { Padding = padding, EnableHoverEffect = enable_hover_effect }; hl.SetBinding(HyperlinkCell.ForegroundProperty, new Binding(nameof(font_brush)) { Source = this }); hl.SetBinding(HyperlinkCell.TextProperty, _binding); hl.SetBinding(HyperlinkCell.FontFamilyProperty, new Binding(nameof(font_family)) { Source = this }); @@ -43,7 +45,7 @@ namespace mbts.ui.controls { readonly Side _market_side; - public MarketViewHyperlinkElementColumn(MarketViewView.Columns key, BindingBase binding, BindingBase command_binding, IDataGridColumnFilter filter, string filter_template, Side market_side) : base(key, binding, command_binding, filter, filter_template) { + public MarketViewHyperlinkElementColumn(MarketViewView.Columns key, BindingBase binding, BindingBase command_binding, IDataGridColumnFilter filter, string filter_template, Side market_side) : base(key, binding, command_binding, filter, filter_template, true) { _market_side = market_side; }