Files
Ursa.Avalonia/demo/Ursa.Demo/Views/TitleBarRightContent.axaml.cs
2024-08-14 22:14:21 +08:00

23 lines
577 B
C#

using System;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
namespace Ursa.Demo.Views;
public partial class TitleBarRightContent : UserControl
{
public TitleBarRightContent()
{
InitializeComponent();
}
private async void OpenRepository(object? sender, RoutedEventArgs e)
{
var top = TopLevel.GetTopLevel(this);
if (top is null) return;
var launcher = top.Launcher;
await launcher.LaunchUriAsync(new Uri("https://github.com/irihitech/Ursa.Avalonia"));
}
}