61 lines
2.5 KiB
XML
61 lines
2.5 KiB
XML
<EgtWPFLib5:EgtCustomWindow x:Class="OpenProjectFileDialogV"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
|
Title="{Binding Title}"
|
|
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
|
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
|
IsMinimizable="False" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"
|
|
Height="390" Width="300" Topmost="True"
|
|
DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
|
|
|
<EgtWPFLib5:EgtCustomWindow.Resources>
|
|
<EgtWPFLib5:FileNameConverter x:Key="FileNameConverter"/>
|
|
</EgtWPFLib5:EgtCustomWindow.Resources>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="5*"/>
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<ListBox Grid.Row="0"
|
|
ItemsSource="{Binding ProjectList}"
|
|
SelectedItem="{Binding SelProject}"
|
|
Margin="5">
|
|
<!--<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding ProjFileName}"/>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>-->
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
|
|
<Setter Property="Padding" Value="0"></Setter>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding OpenFileName}"
|
|
Padding="4,1,4,1">
|
|
<TextBlock.InputBindings>
|
|
<MouseBinding MouseAction="LeftDoubleClick"
|
|
Command="{Binding DataContext.ProjectDoubleClick_Command, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"
|
|
CommandParameter="{Binding nProjId}" />
|
|
</TextBlock.InputBindings>
|
|
</TextBlock>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
<UniformGrid Columns="2" Grid.Row="1" Margin="0,0,0,5">
|
|
<Button IsDefault="True" Name="OpenBtn"
|
|
Content="{Binding OpenMsg}" Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
|
<Button IsCancel="True"
|
|
Content="{Binding CancelMsg}" Style="{DynamicResource EgtWPFLib5_InputButton}"/>
|
|
</UniformGrid>
|
|
|
|
</Grid>
|
|
|
|
</EgtWPFLib5:EgtCustomWindow>
|