diff --git a/UI/Controls/Charts/Charts.cs b/UI/Controls/Charts/Charts.cs index eafc644..c76ccf2 100644 --- a/UI/Controls/Charts/Charts.cs +++ b/UI/Controls/Charts/Charts.cs @@ -571,13 +571,16 @@ public override void OnApplyTemplate() Render(); } - var parent = VisualTreeHelper.GetParent(this); - while (!(parent is System.Windows.Window)) + if (ChartsType == ChartsType.HorizontalA && IsSearch) { - parent = VisualTreeHelper.GetParent(parent); + var parent = VisualTreeHelper.GetParent(this); + while (!(parent is System.Windows.Window)) + { + parent = VisualTreeHelper.GetParent(parent); + } + var page = parent as System.Windows.Window; + page.SizeChanged += Page_SizeChanged; } - var page = parent as System.Windows.Window; - page.SizeChanged += Page_SizeChanged; } private void _typeColumnCanvas_SizeChanged(object sender, SizeChangedEventArgs e) @@ -1193,7 +1196,7 @@ private void RenderColumnStyle() colValueRect.Height = value / maxValue * canvasHeight; colValueRect.Fill = UI.Base.Color.Colors.GetFromString(colColor); colValueRect.RadiusX = 4; - colValueRect.RadiusY= 4; + colValueRect.RadiusY = 4; Canvas.SetLeft(colValueRect, i * columnBorderWidth + margin); Canvas.SetBottom(colValueRect, colNameHeight);