File tree Expand file tree Collapse file tree 2 files changed +26
-17
lines changed
UI/WindowingSamples/WindowingSamples Expand file tree Collapse file tree 2 files changed +26
-17
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,39 @@ public MainPage()
11
11
12
12
public void BasicWindowSample ( )
13
13
{
14
+ // Create window instance
14
15
var window = new Window ( ) ;
15
- var textBlock = new TextBlock ( ) { Text = "Hello, from second window!" , FontSize = 60 } ;
16
- window . Content = textBlock ;
16
+
17
+ // Set up content
18
+ var grid = new Grid ( )
19
+ {
20
+ Background = new SolidColorBrush ( Colors . CornflowerBlue ) ,
21
+ Children =
22
+ {
23
+ new TextBlock ( )
24
+ {
25
+ Text = "Hello from second window!" ,
26
+ Foreground = new SolidColorBrush ( Colors . White ) ,
27
+ HorizontalAlignment = HorizontalAlignment . Center ,
28
+ VerticalAlignment = VerticalAlignment . Center ,
29
+ FontSize = 60
30
+ }
31
+ }
32
+ } ;
33
+
34
+ window . Content = grid ;
35
+
36
+ // Show window
17
37
window . Activate ( ) ;
18
38
}
19
39
20
40
public void CustomWindowSample ( ) { } // => new CustomWindow().Activate();
21
41
22
- public void FullScreenModeSample ( ) => new FullScreenModeWindow ( ) . Activate ( ) ;
42
+ public void FullScreenModeSample ( ) => new FullScreenModeWindow ( ) . Activate ( ) ;
23
43
24
- public void MinimizeMaximizeSample ( ) => new MinimizeMaximizeWindow ( ) . Activate ( ) ;
44
+ public void MinimizeMaximizeSample ( ) => new MinimizeMaximizeWindow ( ) . Activate ( ) ;
25
45
26
- public void WindowTitleSample ( ) => new WindowTitleWindow ( ) . Activate ( ) ;
46
+ public void WindowTitleSample ( ) => new WindowTitleWindow ( ) . Activate ( ) ;
27
47
28
- public void StayOnTopSample ( ) => new StayOnTopWindow ( ) . Activate ( ) ;
48
+ public void StayOnTopSample ( ) => new StayOnTopWindow ( ) . Activate ( ) ;
29
49
}
Original file line number Diff line number Diff line change 34
34
<UnoFeatures >
35
35
</UnoFeatures >
36
36
</PropertyGroup >
37
- <ItemGroup >
38
- <None Remove =" FullScreenModeWindow.xaml" />
39
- </ItemGroup >
40
- <ItemGroup >
41
- <Page Update =" FullScreenModeWindow.xaml" >
42
- <XamlRuntime >$(DefaultXamlRuntime)</XamlRuntime >
43
- </Page >
44
- </ItemGroup >
45
- <ItemGroup >
46
- <UpToDateCheckInput Remove =" FullScreenModeWindow.xaml" />
47
- </ItemGroup >
48
37
49
38
</Project >
You can’t perform that action at this time.
0 commit comments