feat: resolve highlight binding issue.

This commit is contained in:
rabbitism
2024-02-13 22:51:38 +08:00
parent a302081ef6
commit 7051521040
5 changed files with 145 additions and 64 deletions

View File

@@ -0,0 +1,30 @@
using Avalonia.Controls;
namespace Ursa.Controls;
public class OverflowStackPanel: StackPanel
{
public Panel? OverflowPanel { get; set; }
public void MoveChildrenToOverflowPanel()
{
var children = this.Children.ToList();
foreach (var child in children)
{
this.Children.Remove(child);
this.OverflowPanel?.Children.Add(child);
}
}
public void MoveChildrenToMainPanel()
{
var children = this.OverflowPanel?.Children.ToList();
if (children != null && children.Count > 0)
{
foreach (var child in children)
{
this.OverflowPanel?.Children.Remove(child);
this.Children.Add(child);
}
}
}
}