-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDirectXPage.xaml
225 lines (199 loc) · 10.8 KB
/
DirectXPage.xaml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<Page
x:Class="VBA10.DirectXPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:VBA10"
xmlns:controls="using:VBA10.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
KeyDown="AppShell_KeyDown"
>
<Page.Resources>
<DataTemplate x:Key="NavMenuItemTemplate" x:DataType="local:NavMenuItem">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="48" />
<ColumnDefinition Width="600"/>
</Grid.ColumnDefinitions>
<!-- Showing a ToolTip and the Label is redundant. We put the ToolTip on the icon.
It appears when the user hovers over the icon, but not the label which provides
value when the SplitView is 'Compact' while reducing the likelihood of showing
redundant information when the label is shown.-->
<FontIcon x:Name="Glyph" FontSize="16" Glyph="{x:Bind SymbolAsChar}"
VerticalAlignment="Center" HorizontalAlignment="Center"
ToolTipService.ToolTip="{x:Bind Label}"
/>
<TextBlock x:Name="Text" Grid.Column="1" Text="{x:Bind Label}"
/>
</Grid>
</DataTemplate>
</Page.Resources>
<SwapChainPanel x:Name="swapChainPanel">
<!-- Adaptive triggers -->
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<VisualState x:Name="wideView">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="1000" />
</VisualState.StateTriggers>
<VisualState.Setters>
<!--<Setter Target="RootSplitView.DisplayMode" Value="CompactInline"/>
<Setter Target="RootSplitView.IsPaneOpen" Value="True"/>-->
<Setter Target="RootSplitView.OpenPaneLength" Value="200"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="mediumView">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="500" />
</VisualState.StateTriggers>
<VisualState.Setters>
<!--<Setter Target="RootSplitView.DisplayMode" Value="Overlay"/>-->
<Setter Target="RootSplitView.OpenPaneLength" Value="120"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="narrowView">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="0" />
</VisualState.StateTriggers>
<VisualState.Setters>
<!--<Setter Target="RootSplitView.DisplayMode" Value="Overlay"/>-->
<Setter Target="RootSplitView.OpenPaneLength" Value="48"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<!-- Top-level navigation menu + app content -->
<SplitView x:Name="RootSplitView"
DisplayMode="Inline"
IsTabStop="False"
Background="Transparent"
>
<SplitView.Pane >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- A custom ListView to display the items in the pane. The automation Name is set in the ContainerContentChanging event. -->
<controls:NavMenuListView x:Name="NavMenuList"
IsTabStop="False"
Margin="0,48,0,0"
VerticalAlignment="Top"
ContainerContentChanging="NavMenuItemContainerContentChanging"
ItemContainerStyle="{StaticResource NavMenuItemContainerStyle}"
ItemTemplate="{StaticResource NavMenuItemTemplate}"
ItemInvoked="NavMenuList_ItemInvoked"
>
<!--<controls:NavMenuListView.Header>
-->
<!-- Using this custom back navigation button until the system-provided back button is enabled. -->
<!--
<Button x:Name="BackButton"
TabIndex="2"
Style="{StaticResource NavigationBackButtonStyle}"
IsEnabled="{x:Bind AppFrame.CanGoBack, Mode=OneWay}"
HorizontalAlignment="{Binding ItemsPanelRoot.HorizontalAlignment, ElementName=NavMenuList}"
Click="BackButton_Click"/>
</controls:NavMenuListView.Header>-->
</controls:NavMenuListView>
</Grid>
</SplitView.Pane>
<!-- OnNavigatingToPage we synchronize the selected item in the nav menu with the current page.
OnNavigatedToPage we move keyboard focus to the first item on the page after it's loaded. -->
<SplitView.Content>
<Frame x:Name="contentFrame" Margin="-1,0,0,0">
<!--Navigating="OnNavigatingToPage"
Navigated="OnNavigatedToPage"-->
<Frame.ContentTransitions>
<TransitionCollection>
<NavigationThemeTransition>
<NavigationThemeTransition.DefaultNavigationTransitionInfo>
<EntranceNavigationTransitionInfo/>
</NavigationThemeTransition.DefaultNavigationTransitionInfo>
</NavigationThemeTransition>
</TransitionCollection>
</Frame.ContentTransitions>
</Frame>
</SplitView.Content>
</SplitView>
<!-- Declared last to have it rendered above everything else, but it needs to be the first item in the tab sequence. -->
<ToggleButton x:Name="TogglePaneButton"
IsTabStop="False"
Style="{StaticResource SplitViewTogglePaneButtonStyle}"
IsChecked="{Binding IsPaneOpen, ElementName=RootSplitView, Mode=TwoWay}"
Unchecked="TogglePaneButton_UnChecked"
Checked="TogglePaneButton_Checked"
AutomationProperties.Name="Menu"
ToolTipService.ToolTip="Menu"
VerticalAlignment="Top"
/>
<!---->
<!-- buttons to accept/cancel button position configuration-->
<StackPanel x:Name="panelEditButton"
Visibility="Collapsed"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Orientation="Horizontal"
Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}"
Padding="12, 8, 12, 8">
<Button Grid.Column="2"
x:Name="CancelPositionBtn"
Content=""
Margin="0, 0, 28, 0"
Click="CancelPositionBtn_Click"
Style="{StaticResource AppBarButtonStyleLarge}"
/>
<Button Grid.Column="2"
x:Name="AcceptPositionBtn"
Content=""
Click="AcceptPositionBtn_Click"
Style="{StaticResource AppBarButtonStyleLarge}"
/>
</StackPanel>
<!--notification bannter-->
<StackPanel Background="{ThemeResource SystemControlBackgroundAccentBrush}"
VerticalAlignment="Top"
x:Name="notificationPanel"
Opacity="0"
Visibility="Collapsed"
>
<StackPanel.Resources>
<Storyboard x:Name="notificationEntrance">
<PopInThemeAnimation SpeedRatio="0.7" TargetName="notificationPanel"
/>
</Storyboard>
<Storyboard x:Name="notificationExit">
<PopOutThemeAnimation SpeedRatio="0.7" TargetName="notificationPanel" />
</Storyboard>
<Storyboard x:Name="notificationEntranceExit" Storyboard.TargetName="">
<DoubleAnimationUsingKeyFrames BeginTime="0:0:0" Storyboard.TargetName="notificationPanel"
Storyboard.TargetProperty="Opacity">
<SplineDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
<SplineDoubleKeyFrame KeyTime="0:0:2.5" Value="1"/>
<SplineDoubleKeyFrame KeyTime="0:0:3" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames BeginTime="0:0:0" Storyboard.TargetName="notificationPanel"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible"/>
<DiscreteObjectKeyFrame KeyTime="0:0:3" Value="Collapsed"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</StackPanel.Resources>
<TextBlock x:Name="txtNotification"
Text="test" Foreground="White"
Margin="12,4,12,4"
TextWrapping="Wrap"
/>
</StackPanel>
</SwapChainPanel>
<!--<Page.BottomAppBar>
<AppBar x:Name="bottomAppBar" Padding="10,0,10,0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<AppBarButton
Label="Start ROM"
Icon="Play"
Click="StartROM_Click"/>
</StackPanel>
</AppBar>
</Page.BottomAppBar>-->
</Page>