mirror of
https://github.com/izzy2lost/vba10.git
synced 2026-03-26 18:15:30 -07:00
226 lines
11 KiB
XML
226 lines
11 KiB
XML
<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>
|