summaryrefslogtreecommitdiff
path: root/Noddybox.WindowsPhone.Silverlight/SaveDialog.xaml
diff options
context:
space:
mode:
Diffstat (limited to 'Noddybox.WindowsPhone.Silverlight/SaveDialog.xaml')
-rw-r--r--Noddybox.WindowsPhone.Silverlight/SaveDialog.xaml62
1 files changed, 47 insertions, 15 deletions
diff --git a/Noddybox.WindowsPhone.Silverlight/SaveDialog.xaml b/Noddybox.WindowsPhone.Silverlight/SaveDialog.xaml
index 012d2d2..ef45e68 100644
--- a/Noddybox.WindowsPhone.Silverlight/SaveDialog.xaml
+++ b/Noddybox.WindowsPhone.Silverlight/SaveDialog.xaml
@@ -1,16 +1,21 @@
<UserControl x:Class="Noddybox.WindowsPhone.Silverlight.SaveDialog"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- mc:Ignorable="d"
- FontFamily="{StaticResource PhoneFontFamilyNormal}"
- FontSize="{StaticResource PhoneFontSizeNormal}"
- Foreground="{StaticResource PhoneForegroundBrush}"
- d:DesignHeight="480" d:DesignWidth="480">
-
- <Grid x:Name="LayoutRoot">
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:conv="clr-namespace:Noddybox.WindowsPhone.Silverlight.Converters"
+ mc:Ignorable="d"
+ FontFamily="{StaticResource PhoneFontFamilyNormal}"
+ FontSize="{StaticResource PhoneFontSizeNormal}"
+ Foreground="{StaticResource PhoneForegroundBrush}"
+ d:DesignHeight="480" d:DesignWidth="480">
+ <UserControl.Resources>
+ <conv:ConvertFolderFlag x:Key="ConvertFolderFlag" />
+ </UserControl.Resources>
+
+ <Grid x:Name="LayoutRoot" >
<Grid.RowDefinitions>
+ <RowDefinition Height="auto" />
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
@@ -19,9 +24,36 @@
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
- <ListBox x:Name="fileList" Grid.Row="0" Grid.ColumnSpan="2"/>
- <TextBox x:Name="fileName" Grid.Row="1" Grid.ColumnSpan="2"/>
- <Button Grid.Row="2" Grid.Column="0" Content="Ok" />
- <Button Grid.Row="2" Grid.Column="1" Content="Cancel" />
+ <TextBlock Grid.Row="0" Grid.ColumnSpan="2"
+ Text="{Binding Path, Mode=OneWay}" Margin="4"/>
+ <ListBox x:Name="fileList" Grid.Row="1" Grid.ColumnSpan="2"
+ ItemsSource="{Binding FileList, Mode=OneWay}"
+ SelectionMode="Single"
+ SelectionChanged="OnFileListSelection">
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="32" />
+ <ColumnDefinition Width="32" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+ <Image Grid.Column="0"
+ Source="{Binding IsFolder, Mode=OneWay, Converter={StaticResource ConvertFolderFlag}}"
+ VerticalAlignment="Center"
+ HorizontalAlignment="Center" />
+ <TextBlock Grid.Column="2"
+ Text="{Binding Name, Mode=OneWay}" />
+ </Grid>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+ <TextBox x:Name="fileName" Grid.Row="2" Grid.ColumnSpan="2"
+ KeyUp="OnFilenameKeyUp"/>
+ <Button x:Name="okButton" Grid.Row="3" Grid.Column="0" Content="Ok"
+ IsEnabled="{Binding IsFileSelected, Mode=OneWay}"
+ Click="OnOKButton"/>
+ <Button x:Name="cancelButton" Grid.Row="3" Grid.Column="1" Content="Cancel"
+ Click="OnCancelButton"/>
</Grid>
</UserControl>