-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
77 lines (64 loc) · 3.88 KB
/
MainWindow.xaml
File metadata and controls
77 lines (64 loc) · 3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!-- Copyright (c) Microsoft Corporation and Contributors. -->
<!-- Licensed under the MIT License. -->
<Window
x:Class="WinUI3_SwapChainPanel_Direct2D.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinUI3_SwapChainPanel_Direct2D"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:media="using:Microsoft.UI.Xaml.Media"
mc:Ignorable="d">
<Grid>
<!--<Grid.Resources>
<media:AcrylicBrush x:Key="CustomAcrylicBrush"
TintOpacity="0.4" TintColor="#FFFF0000" FallbackColor="#FF008000" />
</Grid.Resources>-->
<Grid.ColumnDefinitions>
<!--<ColumnDefinition Width="660"></ColumnDefinition>-->
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="140"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="34"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Right" VerticalAlignment="Center">
<!--Height="200"-->
<Button x:Name="myButton" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0, 0, 10, 0" Width="120"
Click="myButton_Click" Content="Click Me" >
</Button>
<Button x:Name="buttonButterfly" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0, 10, 10, 0" Width="120"
Content="Add butterfly" Click="buttonButterfly_Click" >
</Button>
<!--<NumberBox x:Name="nbSpeed" Header="Sprite Speed" Minimum ="0" Maximum ="10" Value="1" SpinButtonPlacementMode="Compact"
Margin="0, 20, 10, 0"
SmallChange="0.1" LargeChange="1" />-->
<TextBlock x:Name="headerSlider" Text="Bird Speed" HorizontalAlignment="Center" Margin="0, 20, 0, 0" Height="50"
Foreground="Yellow" IsTextSelectionEnabled ="false">
</TextBlock>
<Slider x:Name="sliderSpeed" Height="200" Orientation="Vertical" HorizontalAlignment="Center" Margin="10, 0, 10, 0"
TickFrequency="0.1" TickPlacement="Outside" Maximum="20" Minimum="0" StepFrequency="0.1"
Value="{x:Bind GetSpeed(SpriteSpeed), BindBack=SetSpeed, Mode=TwoWay}" />
</StackPanel>
<Border Grid.Row="1" Grid.Column="1" Background="Black" BorderThickness="2" BorderBrush="Gray" Margin="10, 0, 10, 10">
<TextBlock x:Name="tbFPS" HorizontalAlignment="Center" Margin="0, 0, 0, 0" Height="30"
Foreground="Lime" IsTextSelectionEnabled ="false">
</TextBlock>
</Border>
<SwapChainPanel x:Name="scpD2D" Grid.RowSpan="2"
Margin="10, 10, 0, 10"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
RenderTransformOrigin="0.5 0.5" >
<!--<Rectangle Fill="{ThemeResource CustomAcrylicBrush}" Width="600" Height="400" />-->
<!--Width ="800" Height="400"-->
<!--HorizontalAlignment="Center" VerticalAlignment="Center"-->
<!--<SwapChainPanel.RenderTransform>
<ScaleTransform ScaleY="1" ScaleX="1" />
--><!--<ScaleTransform ScaleY="1.25" ScaleX="1.25" />--><!--
</SwapChainPanel.RenderTransform>-->
</SwapChainPanel>
<!--<Rectangle Fill="{ThemeResource CustomAcrylicBrush}" Width="600" Height="400"
Grid.RowSpan="2" />-->
</Grid>
</Window>