Files
vba10/SelectFilePane.xaml

64 lines
2.3 KiB
XML

<UserControl
x:Class="VBA10.SelectFilePane"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:VBA10"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="346">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
BorderThickness="2,0,2,2" BorderBrush="{ThemeResource ListBoxBorderThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.Resources>
<CollectionViewSource x:Name="FileListvs"/>
</Grid.Resources>
<StackPanel Background="{ThemeResource ListBoxBorderThemeBrush}"
VerticalAlignment="Stretch">
<TextBlock Text="Assigned at run time"
x:Name="txtTitle"
Style="{ThemeResource TitleTextBlockStyle}"
Margin="10,4,0,4"
/>
</StackPanel>
<TextBlock x:Name="txtNoFile" Grid.Row="1"
Text="**No supported file found!"
Foreground="Red"
x:Uid="NoSupportedFile"
Margin="10,8,0,8"/>
<ListBox Name="fileList"
Background="Transparent"
SelectionChanged="fileList_SelectionChanged"
ItemsSource="{Binding Source={StaticResource FileListvs}}"
Grid.Row="1"
>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Padding" Value="10"/>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding}"
FontSize="18"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</UserControl>