diff --git a/source/iNKORE.UI.WPF.Modern.Gallery/Pages/Controls/Windows/SystemBackdropsPage.xaml b/source/iNKORE.UI.WPF.Modern.Gallery/Pages/Controls/Windows/SystemBackdropsPage.xaml index 79897e1..0489b8f 100644 --- a/source/iNKORE.UI.WPF.Modern.Gallery/Pages/Controls/Windows/SystemBackdropsPage.xaml +++ b/source/iNKORE.UI.WPF.Modern.Gallery/Pages/Controls/Windows/SystemBackdropsPage.xaml @@ -10,16 +10,12 @@ d:DesignWidth="800" mc:Ignorable="d"> - + - + - - - - diff --git a/source/iNKORE.UI.WPF.Modern.Gallery/Pages/Controls/Windows/SystemBackdropsPage.xaml.cs b/source/iNKORE.UI.WPF.Modern.Gallery/Pages/Controls/Windows/SystemBackdropsPage.xaml.cs index 6dc0a41..0e80b15 100644 --- a/source/iNKORE.UI.WPF.Modern.Gallery/Pages/Controls/Windows/SystemBackdropsPage.xaml.cs +++ b/source/iNKORE.UI.WPF.Modern.Gallery/Pages/Controls/Windows/SystemBackdropsPage.xaml.cs @@ -27,11 +27,13 @@ public partial class SystemBackdropsPage : Page public SystemBackdropsPage() { InitializeComponent(); + UpdateExampleCode(); } private void createMicaWindow_Click(object sender, RoutedEventArgs e) { var newWindow = new SampleSystemBackdropsWindow(); + WindowHelper.SetSystemBackdropType(newWindow, BackdropType.Mica); newWindow.Show(); } @@ -46,9 +48,24 @@ private void createAcrylicWindow_Click(object sender, RoutedEventArgs e) public void UpdateExampleCode() { + if (!this.IsInitialized) return; + Example1.CSharp = Example1CS; + Example2.CSharp = Example2CS; } + public string Example1CS => $@" +var newWindow = new SampleSystemBackdropsWindow(); +WindowHelper.SetSystemBackdropType(newWindow, BackdropType.Mica); +newWindow.Show(); +"; + + public string Example2CS => $@" +var newWindow = new SampleSystemBackdropsWindow(); +WindowHelper.SetSystemBackdropType(newWindow,BackdropType.Acrylic); +newWindow.Show(); +"; + #endregion }