1- using iNKORE . UI . WPF . Modern . Controls ;
1+ using iNKORE . UI . WPF . Modern . Controls ;
22using iNKORE . UI . WPF . Modern . Media ;
33using System ;
44using System . Collections . Generic ;
1414using System . Windows . Media . Imaging ;
1515using System . Windows . Navigation ;
1616using System . Windows . Shapes ;
17+ using System . Diagnostics ;
18+ using iNKORE . UI . WPF . Modern . Gallery . DataModel ;
1719using Page = iNKORE . UI . WPF . Modern . Controls . Page ;
1820
1921namespace iNKORE . UI . WPF . Modern . Gallery . Pages . Controls . Windows
@@ -48,11 +50,39 @@ private void OpacitySliderInApp_ValueChanged(object sender, RoutedPropertyChange
4850 UpdateExampleCode ( ) ;
4951 }
5052
53+ private void Hyperlink_RequestNavigate ( object sender , RequestNavigateEventArgs e )
54+ {
55+ Process . Start ( new ProcessStartInfo ( e . Uri . AbsoluteUri ) { UseShellExecute = true } ) ;
56+ e . Handled = true ;
57+ }
58+
59+ private async void SystemBackdropLink_Click ( object sender , RoutedEventArgs e )
60+ {
61+ var realms = await ControlInfoDataSource . Instance . GetRealmsAsync ( ) ;
62+ var item = realms
63+ . SelectMany ( r => r . Groups )
64+ . SelectMany ( g => g . Items )
65+ . FirstOrDefault ( ci => ci . UniqueId == "SystemBackdrops" ) ;
66+ if ( item == null ) return ;
67+
68+ NavigationRootPage . RootFrame . Navigate ( ItemPage . Create ( item ) ) ;
69+ }
70+
71+ private void OpacitySliderLumin_ValueChanged ( object sender , RoutedPropertyChangedEventArgs < double > e )
72+ {
73+ UpdateExampleCode ( ) ;
74+ }
75+
76+ private void LuminositySlider_ValueChanged ( object sender , RoutedPropertyChangedEventArgs < double > e )
77+ {
78+ UpdateExampleCode ( ) ;
79+ }
5180
5281 private void UpdateExampleCode ( )
5382 {
5483 Example1 . Xaml = Example1Xaml ;
5584 Example3 . Xaml = Example3Xaml ;
85+ Example4 . Xaml = Example4Xaml ;
5686 }
5787
5888 string Example1Xaml => @"
@@ -79,12 +109,29 @@ private void UpdateExampleCode()
79109" ;
80110
81111 string Example3Xaml => $@ "
82- <Grid
83- x:Name=""Example3Grid""
84- Width=""320""
85- Height=""200""
112+ <Grid x:Name=""Example3Grid""
113+ Width=""320"" Height=""200""
86114 HorizontalAlignment=""Left"">
87115 <Grid x:Name=""Acrylic3Grid""
116+ Background=""{{DynamicResource {{x:Static ui:ThemeKeys.SolidBackgroundFillColorBaseBrushKey}}}}"">
117+ <Rectangle Width=""100"" Height=""200"" Fill=""Aqua""
118+ HorizontalAlignment=""Left"" VerticalAlignment=""Top"" />
119+ <Ellipse Width=""152"" Height=""152"" Fill=""Magenta""
120+ HorizontalAlignment=""Center"" VerticalAlignment=""Center"" />
121+ <Rectangle Width=""80"" Height=""100"" Fill=""Yellow""
122+ HorizontalAlignment=""Right"" VerticalAlignment=""Bottom"" />
123+ </Grid>
124+ <ui:AcrylicPanel x:Name=""CustomAcrylicShapeInApp""
125+ Margin=""12"" Target=""{{Binding ElementName=Acrylic3Grid}}""
126+ TintColor=""{ CustomAcrylicShapeInApp . TintColor . ToHEX ( ) } "" TintOpacity=""{ CustomAcrylicShapeInApp . TintOpacity . ToString ( ) } "" />
127+ </Grid>
128+ " ;
129+
130+ string Example4Xaml => $@ "
131+ <Grid x:Name=""Example4Grid""
132+ Width=""320"" Height=""200""
133+ HorizontalAlignment=""Left"">
134+ <Grid x:Name=""Acrylic4Grid""
88135 Background=""{{DynamicResource {{x:Static ui:ThemeKeys.SolidBackgroundFillColorBaseBrushKey}}}}"">
89136 <Rectangle
90137 Width=""100""
@@ -105,12 +152,10 @@ private void UpdateExampleCode()
105152 VerticalAlignment=""Bottom""
106153 Fill=""Yellow"" />
107154 </Grid>
108- <ui:AcrylicPanel
109- x:Name=""CustomAcrylicShapeInApp""
110- Margin=""12""
111- Target=""{{Binding ElementName=Acrylic3Grid}}""
112- TintColor=""${ CustomAcrylicShapeInApp . TintColor . ToHEX ( ) } ""
113- TintOpacity=""${ CustomAcrylicShapeInApp . TintOpacity . ToString ( ) } "" />
155+ <ui:AcrylicPanel x:Name=""CustomAcrylicShapeLumin""
156+ Margin=""12"" TintColor=""SkyBlue""
157+ Target=""{{Binding ElementName=Acrylic4Grid}}""
158+ TintOpacity=""{ CustomAcrylicShapeLumin . TintOpacity . ToString ( ) } "" Amount=""{ CustomAcrylicShapeLumin . Amount . ToString ( ) } "" />
114159</Grid>
115160" ;
116161
0 commit comments