Skip to content

Commit

Permalink
修复列表样式显示错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
noberumotto committed Nov 23, 2022
1 parent e639bda commit 5f63fe0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions UI/Controls/Charts/Charts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 5f63fe0

Please sign in to comment.