|
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 | 6 | xmlns:local="clr-namespace:DolphinDynamicInputTextureCreator.Controls" |
| 7 | + xmlns:converters="clr-namespace:DolphinDynamicInputTextureCreator.ValueConverters" |
7 | 8 | mc:Ignorable="d" |
8 | | - Height="220" Width="320"> |
9 | | - <Grid Background="White"> |
| 9 | + Height="200" Width="320"> |
| 10 | + <UserControl.Resources> |
| 11 | + <ResourceDictionary> |
| 12 | + |
| 13 | + </ResourceDictionary> |
| 14 | + </UserControl.Resources> |
| 15 | + <Grid Grid.Row="0" Background="White"> |
10 | 16 | <Grid.RowDefinitions> |
11 | | - <RowDefinition Height="*" /> |
12 | | - <RowDefinition Height="25"/> |
| 17 | + <RowDefinition Height="auto" /> |
| 18 | + <RowDefinition Height="auto" /> |
| 19 | + <RowDefinition Height="auto" /> |
| 20 | + <RowDefinition Height="auto" /> |
| 21 | + <RowDefinition Height="auto" /> |
13 | 22 | </Grid.RowDefinitions> |
14 | | - <Grid Grid.Row="0"> |
15 | | - <Grid.RowDefinitions> |
16 | | - <RowDefinition Height="*" /> |
17 | | - <RowDefinition Height="*" /> |
18 | | - <RowDefinition Height="*" /> |
19 | | - <RowDefinition Height="*" /> |
20 | | - <RowDefinition Height="*" /> |
21 | | - </Grid.RowDefinitions> |
22 | | - <Grid.ColumnDefinitions> |
23 | | - <ColumnDefinition Width="150"/> |
24 | | - <ColumnDefinition Width="*"/> |
25 | | - </Grid.ColumnDefinitions> |
26 | | - <Label Content="Output json name:" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalContentAlignment="Right"/> |
27 | | - <TextBox Text="{Binding GeneratedJsonName, Mode=TwoWay}" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="4,0"/> |
28 | | - <Label Content="Generated folder name:" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalContentAlignment="Right"/> |
29 | | - <TextBox Text="{Binding GeneratedFolderName, Mode=TwoWay}" Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="4,0"/> |
30 | | - <Label Content="Preserve aspect ratio:" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" HorizontalContentAlignment="Right"/> |
31 | | - <CheckBox IsChecked="{Binding PreserveAspectRatio, Mode=TwoWay}" Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="4,0"/> |
32 | | - <Label Content="Game ID:" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" HorizontalContentAlignment="Right"/> |
33 | | - <TextBox Text="{Binding GameID, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="4,0"/> |
| 23 | + <Grid.ColumnDefinitions> |
| 24 | + <ColumnDefinition Width="150"/> |
| 25 | + <ColumnDefinition Width="*"/> |
| 26 | + </Grid.ColumnDefinitions> |
| 27 | + <Label Content="Output json name:" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalContentAlignment="Right"/> |
| 28 | + <TextBox Text="{Binding GeneratedJsonName, Mode=TwoWay}" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="4,6"/> |
| 29 | + <Label Content="Generated folder name:" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalContentAlignment="Right"/> |
| 30 | + <TextBox Text="{Binding GeneratedFolderName, Mode=TwoWay}" Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="4,6"/> |
| 31 | + <Label Content="Preserve aspect ratio:" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" HorizontalContentAlignment="Right"/> |
| 32 | + <CheckBox IsChecked="{Binding PreserveAspectRatio, Mode=TwoWay}" Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="4,6"/> |
| 33 | + <Label Content="Game ID:" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" HorizontalContentAlignment="Right"/> |
| 34 | + <TextBox Text="{Binding GameID, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="4,6"/> |
| 35 | + |
| 36 | + <GroupBox Header="Export Texture Scaling" Grid.Row="4" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="Gray"> |
| 37 | + <Grid> |
| 38 | + <Grid.ColumnDefinitions> |
| 39 | + <ColumnDefinition Width="auto"/> |
| 40 | + <ColumnDefinition Width="auto"/> |
| 41 | + </Grid.ColumnDefinitions> |
| 42 | + <Grid.RowDefinitions> |
| 43 | + <RowDefinition Height="*" /> |
| 44 | + <RowDefinition Height="*" /> |
| 45 | + </Grid.RowDefinitions> |
| 46 | + <StackPanel Orientation="Horizontal"> |
| 47 | + <Label Content="Mode:" VerticalAlignment="Center"/> |
| 48 | + <ComboBox ItemsSource="{Binding ExportTextureScaling.ScalingModesHelper}" SelectedItem="{Binding ExportTextureScaling.SelectedScalingModeHelper}" MinWidth="125" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="2,6"/> |
| 49 | + </StackPanel> |
| 50 | + |
| 51 | + <DockPanel Grid.Column="1"> |
| 52 | + |
| 53 | + <DockPanel.Style> |
| 54 | + <Style TargetType="{x:Type DockPanel}"> |
| 55 | + <Setter Property="IsEnabled" Value="False"/> |
| 56 | + <Style.Triggers> |
| 57 | + <DataTrigger Binding="{Binding ExportTextureScaling.SelectedScalingModeHelper}" Value="NearestNeighbor"> |
| 58 | + <Setter Property="IsEnabled" Value="True"/> |
| 59 | + </DataTrigger> |
| 60 | + <DataTrigger Binding="{Binding ExportTextureScaling.SelectedScalingModeHelper}" Value="Bicubic"> |
| 61 | + <Setter Property="IsEnabled" Value="True"/> |
| 62 | + </DataTrigger> |
| 63 | + <DataTrigger Binding="{Binding ExportTextureScaling.SelectedScalingModeHelper}" Value="Bilinear"> |
| 64 | + <Setter Property="IsEnabled" Value="True"/> |
| 65 | + </DataTrigger> |
| 66 | + </Style.Triggers> |
| 67 | + </Style> |
| 68 | + </DockPanel.Style> |
34 | 69 |
|
35 | | - </Grid> |
| 70 | + <StackPanel Orientation="Horizontal" Grid.Column="1" Margin="5,0"> |
| 71 | + <Label Content="Factor:" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" /> |
| 72 | + <ComboBox ItemsSource="{Binding ExportTextureScaling.ScalingFactorHelper}" SelectedItem="{Binding ExportTextureScaling.SelectedScalingFactor}" MinWidth="50" VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="4,0"> |
| 73 | + <ComboBox.ItemTemplate> |
| 74 | + <DataTemplate> |
| 75 | + <StackPanel Orientation="Horizontal"> |
| 76 | + <TextBlock VerticalAlignment="Center" Text="{Binding}" /> |
| 77 | + <TextBlock VerticalAlignment="Center" Text="x" /> |
| 78 | + </StackPanel> |
| 79 | + </DataTemplate> |
| 80 | + </ComboBox.ItemTemplate> |
| 81 | + </ComboBox> |
| 82 | + </StackPanel> |
| 83 | + </DockPanel> |
| 84 | + </Grid> |
| 85 | + </GroupBox> |
36 | 86 | </Grid> |
37 | 87 | </UserControl> |
0 commit comments