mirror of
https://github.com/izzy2lost/vba10.git
synced 2026-03-26 18:15:30 -07:00
255 lines
13 KiB
XML
255 lines
13 KiB
XML
<Page
|
|
x:Class="VBA10.SelectROMPane"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:VBA10"
|
|
xmlns:ctl="using:VBA10.Controls"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d"
|
|
d:DesignWidth="600"
|
|
Name="page"
|
|
>
|
|
|
|
|
|
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
|
x:Name="LayoutRoot">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Adaptive triggers -->
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup>
|
|
<VisualState x:Name="wideView">
|
|
<VisualState.StateTriggers>
|
|
<AdaptiveTrigger MinWindowWidth="1000" />
|
|
</VisualState.StateTriggers>
|
|
<VisualState.Setters>
|
|
<Setter Target="saveBtn.Width" Value="88"/>
|
|
<Setter Target="selectStateBtn.Width" Value="88"/>
|
|
<Setter Target="resetBtn.Width" Value="88"/>
|
|
<Setter Target="loadBtn.Width" Value="88"/>
|
|
<Setter Target="lastRomGrid.Height" Value="250" />
|
|
<Setter Target="txtLastROM.FontSize" Value="30" />
|
|
<Setter Target="txtLastROM.Margin" Value="16, 0, 16, 12" />
|
|
<Setter Target="imgPlay.Width" Value="90" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="mediumView">
|
|
<VisualState.StateTriggers>
|
|
<AdaptiveTrigger MinWindowWidth="500" />
|
|
</VisualState.StateTriggers>
|
|
<VisualState.Setters>
|
|
<Setter Target="saveBtn.Width" Value="68"/>
|
|
<Setter Target="selectStateBtn.Width" Value="68"/>
|
|
<Setter Target="resetBtn.Width" Value="68"/>
|
|
<Setter Target="loadBtn.Width" Value="68"/>
|
|
<Setter Target="lastRomGrid.Height" Value="250" />
|
|
<Setter Target="txtLastROM.FontSize" Value="24" />
|
|
<Setter Target="txtLastROM.Margin" Value="16, 0, 16, 12" />
|
|
<Setter Target="imgPlay.Width" Value="70" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="narrowView">
|
|
<VisualState.StateTriggers>
|
|
<AdaptiveTrigger MinWindowWidth="0" />
|
|
</VisualState.StateTriggers>
|
|
<VisualState.Setters>
|
|
<Setter Target="saveBtn.Width" Value="56"/>
|
|
<Setter Target="selectStateBtn.Width" Value="56"/>
|
|
<Setter Target="resetBtn.Width" Value="56"/>
|
|
<Setter Target="loadBtn.Width" Value="56"/>
|
|
<Setter Target="txtLastROM.FontSize" Value="20" />
|
|
<Setter Target="txtLastROM.Margin" Value="12, 0, 12, 8" />
|
|
<Setter Target="imgPlay.Width" Value="60" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<!--<RelativePanel >-->
|
|
|
|
<CommandBar x:Name="topbar" VerticalAlignment="Top"
|
|
HorizontalContentAlignment="Stretch"
|
|
ClosedDisplayMode="Compact">
|
|
|
|
<!--<AppBarSeparator/>-->
|
|
<AppBarButton Icon="Save" Label="**Save" x:Name="saveBtn"
|
|
Click="saveBtn_Click" IsTabStop="False"
|
|
x:Uid="Save"/>
|
|
<AppBarButton Icon="AllApps" Label="**Select State" x:Name="selectStateBtn"
|
|
Click="selectStateBtn_Click" IsTabStop="False"
|
|
x:Uid="SelectState"/>
|
|
<AppBarButton Icon="Sync" Label="**Reset" x:Name="resetBtn"
|
|
Click="resetBtn_Click" IsTabStop="False"
|
|
x:Uid="Reset"/>
|
|
<AppBarButton Icon="Undo" Label="**Load" x:Name="loadBtn"
|
|
Click="loadBtn_Click" IsTabStop="False"
|
|
x:Uid="Load"/>
|
|
<AppBarButton x:Name="spacerBtn" IsEnabled="False" Width="1000"/>
|
|
<!--<CommandBar.SecondaryCommands>
|
|
<AppBarButton Label="Menu Item 1"/>
|
|
<AppBarButton Label="Menu Item 2"/>
|
|
<AppBarButton Label="Menu Item 3"/>
|
|
</CommandBar.SecondaryCommands>-->
|
|
</CommandBar>
|
|
|
|
|
|
|
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
|
|
VerticalScrollBarVisibility="Auto"
|
|
Margin="0,0,0,0"
|
|
x:Name="svContainer"
|
|
Grid.Row="1"
|
|
>
|
|
<StackPanel
|
|
>
|
|
<StackPanel.Resources>
|
|
<CollectionViewSource x:Name="cvsAllROMEntries"/>
|
|
<CollectionViewSource x:Name="cvsLastROMEntry"/>
|
|
<!--<local:IsoImageConverter x:Key="SnapshotConverter" />-->
|
|
</StackPanel.Resources>
|
|
|
|
<Button x:Name="lastRomGrid"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch"
|
|
Tapped="lastRomImage_Tapped"
|
|
Background="Transparent"
|
|
Margin="12,12,12,0" Padding="0"
|
|
Style="{StaticResource ImageButtonStyle}"
|
|
|
|
>
|
|
<Button.Content>
|
|
<Grid>
|
|
<Image Source="{Binding Snapshot}"
|
|
Stretch="UniformToFill"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
x:Name="lastRomImage"
|
|
|
|
/>
|
|
|
|
<Grid>
|
|
<Grid.Background>
|
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
|
<GradientStop Offset="0.6"/>
|
|
<GradientStop Color="#B2000000" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</Grid.Background>
|
|
<TextBlock Text="{Binding DisplayName}"
|
|
VerticalAlignment="Bottom"
|
|
TextWrapping="Wrap" LineStackingStrategy="BaselineToBaseline"
|
|
Foreground="White"
|
|
x:Name="txtLastROM"
|
|
/>
|
|
</Grid>
|
|
|
|
<Image Source="/Assets/play.png"
|
|
Width="60"
|
|
x:Name="imgPlay"
|
|
Opacity="0.8"/>
|
|
</Grid>
|
|
</Button.Content>
|
|
</Button>
|
|
|
|
|
|
<ListBox Name="romList"
|
|
SelectionChanged="romList_SelectionChanged"
|
|
ItemsSource="{Binding Source={StaticResource cvsAllROMEntries}}"
|
|
Padding="0"
|
|
Margin="12,12,12,0"
|
|
Background="Transparent"
|
|
>
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="Padding" Value="0,12,0,12"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
|
|
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Height="40" x:Name="lbAllROMMainGrid"
|
|
RightTapped="lbAllROMMainGrid_RightTapped"
|
|
>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="60"/>
|
|
<ColumnDefinition Width="*" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid Grid.Column="0"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch"
|
|
>
|
|
<Image Source="{Binding Snapshot}"
|
|
Stretch="UniformToFill"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
/>
|
|
</Grid>
|
|
|
|
<StackPanel Orientation="Vertical"
|
|
VerticalAlignment="Center"
|
|
Grid.Column="1"
|
|
Margin="4,0,0,0">
|
|
<TextBlock
|
|
Text="{Binding DisplayName}"
|
|
TextWrapping="NoWrap"
|
|
FontSize="18" />
|
|
<TextBlock
|
|
Text="{Binding FolderPath}"
|
|
FontSize="12"
|
|
/>
|
|
</StackPanel>
|
|
|
|
<Button Grid.Column="1"
|
|
HorizontalContentAlignment="Right"
|
|
VerticalContentAlignment="Bottom"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Margin="0,-12,0,-12"
|
|
Padding="0,0,0,0"
|
|
BorderThickness="0"
|
|
FontSize="24"
|
|
FontWeight="Light"
|
|
Width="40"
|
|
Height="64"
|
|
Style="{StaticResource MinimalButtonStyle}"
|
|
x:Name="ContextMenuBtn"
|
|
Click="ContextMenuBtn_Click">
|
|
<Button.Content >
|
|
<TextBlock Text="..."
|
|
Margin="0,0,4,0"/>
|
|
</Button.Content>
|
|
</Button>
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
<Button x:Name="addROMbtn"
|
|
HorizontalAlignment="Center"
|
|
x:Uid="AddROMBtn"
|
|
Content="**Add ROM"
|
|
Width="120" Height="40"
|
|
Margin="0,12,0,12"
|
|
Click="addROMbtn_Click"/>
|
|
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
<!--</RelativePanel>-->
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
</Page>
|