|
4 | 4 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
5 | 5 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
6 | 6 | xmlns:local="clr-namespace:UnityLauncherPro" |
| 7 | + xmlns:data="clr-namespace:UnityLauncherPro.Data" |
| 8 | + d:DataContext="{d:DesignInstance Type=local:NewProject}" |
7 | 9 | mc:Ignorable="d" |
8 | | - Title="Create New Project" Height="480" Width="500" Background="{DynamicResource ThemeDarkestBackground}" PreviewKeyDown="Window_PreviewKeyDown" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" ShowInTaskbar="True"> |
| 10 | + Title="Create New Project" Height="480" Width="640" Background="{DynamicResource ThemeDarkestBackground}" PreviewKeyDown="Window_PreviewKeyDown" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" ShowInTaskbar="True"> |
9 | 11 |
|
10 | 12 | <Grid> |
| 13 | + <Grid.ColumnDefinitions> |
| 14 | + <ColumnDefinition Width="*"/> |
| 15 | + <ColumnDefinition Width="164"/> |
| 16 | + </Grid.ColumnDefinitions> |
11 | 17 | <StackPanel Margin="10,3"> |
12 | 18 | <Label Content="Unity Version" Foreground="{DynamicResource ThemeButtonForeground}" Margin="0,0,0,3" Padding="5,5,5,3" /> |
13 | 19 | <DataGrid x:Name="gridAvailableVersions" KeyboardNavigation.TabNavigation = "None" SelectionMode="Single" Height="230" Margin="0" HeadersVisibility="None" AutoGenerateColumns="False" IsSynchronizedWithCurrentItem="True" Foreground="{DynamicResource ThemeButtonForeground}" Background="{DynamicResource ThemeMainBackgroundColor}" SelectionChanged="GridAvailableVersions_SelectionChanged" IsTabStop="True" TabIndex="1" Loaded="GridAvailableVersions_Loaded" EnableRowVirtualization="False" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled" PreviewMouseDoubleClick="gridAvailableVersions_PreviewMouseDoubleClick" CanUserAddRows="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserDeleteRows="False"> |
|
77 | 83 | </StatusBarItem> |
78 | 84 | </StatusBar> |
79 | 85 | </Grid> |
| 86 | + </StackPanel> |
| 87 | + <StackPanel Orientation="Vertical" Margin="0,3,10,3" Grid.Column="1"> |
| 88 | + <Label Content="Unity Online Templates" Foreground="{DynamicResource ThemeButtonForeground}" Margin="0,0,0,3" Padding="5,5,5,3" /> |
| 89 | + <!-- search box --> |
| 90 | + <Grid Background="{DynamicResource ThemeTextBoxBackground}" VerticalAlignment="Top" Margin="6,5,0,0" Height="20" > |
| 91 | + <TextBlock Margin="3,2" MinWidth="100" Text="Filter" Foreground="{DynamicResource ThemeSearchPlaceholder}" Height="24"> |
| 92 | + <TextBlock.Style> |
| 93 | + <Style TargetType="TextBlock"> |
| 94 | + <Setter Property="Visibility" Value="Collapsed" /> |
| 95 | + <Style.Triggers> |
| 96 | + <DataTrigger Binding="{Binding Text, ElementName=txtFilterTemplates}" Value=""> |
| 97 | + <Setter Property="Visibility" Value="Visible" /> |
| 98 | + </DataTrigger> |
| 99 | + </Style.Triggers> |
| 100 | + </Style> |
| 101 | + </TextBlock.Style> |
| 102 | + </TextBlock> |
| 103 | + <TextBox MinWidth="100" CaretBrush="{DynamicResource ThemeSearchCaret}" x:Name="txtFilterTemplates" Background="Transparent" BorderBrush="{x:Null}" Foreground="{DynamicResource ThemeSearchForeground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" BorderThickness="0" Margin="2,2,0,0" UndoLimit="64" /> |
| 104 | + <Button x:Name="btnClearUpdatesSearch" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" BorderThickness="0" HorizontalAlignment="Right" VerticalAlignment="Top" Height="23" Width="23" Background="Transparent" Padding="0,2" Visibility="Visible" BorderBrush="{x:Null}" > |
| 105 | + <TextBlock Text="❌" FontSize="8" Foreground="{DynamicResource ThemeSearchClose}" Padding="5,3,4,4" HorizontalAlignment="Center"> |
| 106 | + <TextBlock.Style> |
| 107 | + <Style TargetType="{x:Type TextBlock}"> |
| 108 | + <Style.Triggers> |
| 109 | + <DataTrigger Binding="{Binding Text, ElementName=txtFilterTemplates}" Value=""> |
| 110 | + <Setter Property="Visibility" Value="Hidden"/> |
| 111 | + </DataTrigger> |
| 112 | + <DataTrigger Binding="{Binding Text, ElementName=txtFilterTemplates}" Value="{x:Null}"> |
| 113 | + <Setter Property="Visibility" Value="Hidden"/> |
| 114 | + </DataTrigger> |
| 115 | + </Style.Triggers> |
| 116 | + </Style> |
| 117 | + </TextBlock.Style> |
| 118 | + </TextBlock> |
| 119 | + </Button> |
| 120 | + </Grid> |
80 | 121 |
|
| 122 | + <ListBox x:Name="listOnlineTemplates" Margin="6,5,0,0" Height="340" |
| 123 | + Background="{DynamicResource ThemeMainBackgroundColor}" |
| 124 | + Foreground="{DynamicResource ThemeButtonForeground}" |
| 125 | + ScrollViewer.HorizontalScrollBarVisibility="Disabled" |
| 126 | + d:ItemsSource="{d:SampleData ItemCount=4}"> |
| 127 | + <ListBox.ItemTemplate> |
| 128 | + <DataTemplate> |
| 129 | + <StackPanel Orientation="Vertical" Margin="3"> |
| 130 | + <Image Source="{Binding PreviewImageURL}" |
| 131 | + Margin="0,0,0,5" |
| 132 | + ToolTip="{Binding Description}" |
| 133 | + Stretch="Uniform" |
| 134 | + HorizontalAlignment="Stretch"/> |
| 135 | + <TextBlock Text="{Binding Name}" |
| 136 | + FontWeight="Bold" |
| 137 | + TextWrapping="Wrap" |
| 138 | + Foreground="{DynamicResource ThemeButtonForeground}"/> |
| 139 | + <TextBlock Text="{Binding Type}" |
| 140 | + FontSize="10" |
| 141 | + Foreground="{DynamicResource ThemeButtonForeground}" |
| 142 | + Opacity="0.7"/> |
| 143 | + </StackPanel> |
| 144 | + </DataTemplate> |
| 145 | + </ListBox.ItemTemplate> |
| 146 | + </ListBox> |
81 | 147 | </StackPanel> |
82 | 148 | </Grid> |
83 | 149 | </Window> |
0 commit comments