Files
EgtWPFLib5/EgtOpenFileDialog.xaml
T
Demetrio Cassarino 95551c5049 -aggiunto lista note selezionabili
-pulito codice
2024-03-07 08:48:06 +01:00

41 lines
1.9 KiB
XML

<EgtWPFLib5:EgtCustomWindow x:Class="EgtOpenFileDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace: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 FileList}" Margin="5" Name="FileNameList"
SelectedItem="{Binding SelectedFile, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource FileNameConverter}}"/>
</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>