mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Make loading custom XAML safer
This commit is contained in:
@@ -117,10 +117,17 @@ namespace RedBookPlayer.GUI
|
|||||||
DataContext = new PlayerViewModel();
|
DataContext = new PlayerViewModel();
|
||||||
|
|
||||||
// Load the theme
|
// Load the theme
|
||||||
if (xaml != null)
|
try
|
||||||
new AvaloniaXamlLoader().Load(xaml, null, this);
|
{
|
||||||
else
|
if(xaml != null)
|
||||||
|
new AvaloniaXamlLoader().Load(xaml, null, this);
|
||||||
|
else
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
AvaloniaXamlLoader.Load(this);
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
|
||||||
InitializeDigits();
|
InitializeDigits();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user