rainmeter-studio/RainmeterStudio/UI/Dialogs/CreateProjectDialog.xaml

98 lines
4.4 KiB
Plaintext
Raw Normal View History

2014-07-26 10:49:11 +00:00
<Window x:Class="RainmeterStudio.UI.Dialogs.CreateProjectDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:r="clr-namespace:RainmeterStudio.Resources"
Title="{x:Static r:Strings.CreateProjectDialog_Title}" Height="320" Width="480"
2014-07-26 10:49:11 +00:00
WindowStartupLocation="CenterOwner"
WindowStyle="ToolWindow" ShowInTaskbar="False">
<Grid Background="WhiteSmoke">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ListView Name="listTemplates" Grid.Row="0" SelectedIndex="0"
IsEnabled="False">
<ListView.ItemTemplate>
<DataTemplate>
<DockPanel>
<Image DockPanel.Dock="Left" Source="{Binding Icon}"
Width="32" Height="32" Margin="2"
Stretch="Uniform" VerticalAlignment="Top" />
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<TextBlock Text="{Binding Name}" FontWeight="Bold" />
<TextBlock Text="{Binding Description}" />
</StackPanel>
</DockPanel>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.GroupStyle>
<GroupStyle>
<GroupStyle.HeaderTemplate>
<DataTemplate>
<TextBlock FontWeight="Bold" FontSize="13pt" Text="{Binding Name}" />
</DataTemplate>
</GroupStyle.HeaderTemplate>
</GroupStyle>
</ListView.GroupStyle>
</ListView>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Name -->
<TextBlock Grid.Row="0" Text="{x:Static r:Strings.CreateProjectDialog_Name}" />
2014-07-26 10:49:11 +00:00
<TextBox Name="textName"
Grid.Row="0" Grid.Column="1"
TextChanged="textName_TextChanged"/>
<!-- Location -->
<TextBlock Grid.Row="1" Text="{x:Static r:Strings.CreateProjectDialog_Location}" />
2014-07-26 10:49:11 +00:00
<ComboBox Name="textLocation" IsEditable="True"
Grid.Row="1" Grid.Column="1" />
<Button Grid.Row="1" Grid.Column="2" Content="{x:Static r:Strings.Dialog_Browse}"/>
<CheckBox Name="checkLocationDefault"
Grid.Row="1" Grid.Column="3"
Content="{x:Static r:Strings.CreateProjectDialog_LocationDefault}"
2014-07-26 10:49:11 +00:00
VerticalAlignment="Center"/>
<!-- Path -->
<TextBlock Grid.Row="2" Text="{x:Static r:Strings.CreateProjectDialog_Path}"/>
2014-07-26 10:49:11 +00:00
<ComboBox Name="textPath"
IsEditable="True"
Grid.Row="2" Grid.Column="1" />
<Button Grid.Row="2" Grid.Column="2" Content="{x:Static r:Strings.Dialog_Browse}" />
<CheckBox Name="checkCreateDirectory"
Grid.Row="2" Grid.Column="3"
Content="{x:Static r:Strings.CreateProjectDialog_PathCreateFolder}"
2014-07-26 10:49:11 +00:00
IsChecked="True"
Checked="checkCreateDirectory_CheckChanged"
Unchecked="checkCreateDirectory_CheckChanged"
VerticalAlignment="Center"/>
</Grid>
<StackPanel Grid.Row="2" Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Command="{Binding CreateCommand}" IsDefault="True" Content="{x:Static r:Strings.Dialog_Create}" />
<Button Command="{Binding CancelCommand}" IsCancel="True" Content="{x:Static r:Strings.Dialog_Cancel}" />
</StackPanel>
</Grid>
</Window>