-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use HyperlinkButton.NavigateUri instead of custom commands
- Loading branch information
1 parent
d065c6a
commit e5aa517
Showing
3 changed files
with
3 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
using Avalonia.Controls; | ||
using Avalonia.ReactiveUI; | ||
using ReactiveUI; | ||
using Vocup.ViewModels; | ||
|
||
namespace Vocup.Views; | ||
|
||
public partial class LicensesControl : ReactiveUserControl<LicensesViewModel> | ||
public partial class LicensesControl : UserControl | ||
{ | ||
public LicensesControl() | ||
{ | ||
InitializeComponent(); | ||
|
||
this.WhenActivated(d => d(ViewModel.LaunchUri.RegisterHandler(async interaction => | ||
{ | ||
var topLevel = TopLevel.GetTopLevel(this); | ||
bool success = await topLevel.Launcher.LaunchUriAsync(interaction.Input); | ||
interaction.SetOutput(success); | ||
}))); | ||
} | ||
} |