feat: add button group.
This commit is contained in:
23
src/Ursa/Controls/ButtonGroup.cs
Normal file
23
src/Ursa/Controls/ButtonGroup.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Net.Http.Headers;
|
||||
using Avalonia;
|
||||
using Avalonia.Collections;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Metadata;
|
||||
|
||||
namespace Ursa.Controls;
|
||||
|
||||
public class ButtonGroup: ItemsControl
|
||||
{
|
||||
protected override bool NeedsContainerOverride(object? item, int index, out object? recycleKey)
|
||||
{
|
||||
recycleKey = null;
|
||||
return item is not Button;
|
||||
}
|
||||
|
||||
protected override Control CreateContainerForItemOverride(object? item, int index, object? recycleKey)
|
||||
{
|
||||
return new Button();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user