mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-08 02:06:37 +08:00
* feat: bring datagrid demo back. * feat: add FunctionalColorGroupControl and ShadowGroupControl with data binding * Add 10 TFM Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> * feat: Use new property Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: fix changelog. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: fix sort member path. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore: remove useless property. --------- Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
25 lines
583 B
C#
25 lines
583 B
C#
using System.Threading.Tasks;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Input.Platform;
|
|
using Semi.Avalonia.Demo.ViewModels;
|
|
|
|
namespace Semi.Avalonia.Demo.Pages;
|
|
|
|
public partial class VariablesDemo : UserControl
|
|
{
|
|
public VariablesDemo()
|
|
{
|
|
InitializeComponent();
|
|
this.DataContext = new VariablesDemoViewModel();
|
|
}
|
|
|
|
public async Task Copy(object? o)
|
|
{
|
|
if (o is null) return;
|
|
var toplevel = TopLevel.GetTopLevel(this);
|
|
if (toplevel?.Clipboard is { } c)
|
|
{
|
|
await c.SetTextAsync(o.ToString());
|
|
}
|
|
}
|
|
} |