mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-01 10:39:50 +08:00
create a setup builder impl from MicaSetup
This commit is contained in:
23
Build/MicaSetup/Design/Controls/Shell/ShellControl.cs
Normal file
23
Build/MicaSetup/Design/Controls/Shell/ShellControl.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace MicaSetup.Design.Controls;
|
||||
|
||||
public class ShellControl : ContentControl
|
||||
{
|
||||
public string Route
|
||||
{
|
||||
get => (string)GetValue(RouteProperty);
|
||||
set => SetCurrentValue(RouteProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty RouteProperty = DependencyProperty.Register(nameof(Route), typeof(string), typeof(ShellControl), new(string.Empty));
|
||||
|
||||
public ShellControl()
|
||||
{
|
||||
Routing.Shell = new WeakReference<ShellControl>(this);
|
||||
FocusVisualStyle = null!;
|
||||
Loaded += (_, _) => Routing.GoTo(Route);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user