Statistics
| Branch: | Revision:

root / trunk / Pithos.Client.WPF / FileProperties / FilePropertiesView.xaml @ 8a84d039

History | View | Annotate | Download (10.8 kB)

1
<Window x:Class="Pithos.Client.WPF.FilePropertiesView"
2
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
5
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cal="http://www.caliburnproject.org"
6
        xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended" mc:Ignorable="d" 
7
             d:DesignHeight="300" d:DesignWidth="400"  Width="400"
8
         Height="400" Icon="/Pithos.Client.WPF;component/Images/PithosTaskbar.png"
9
        Background="{StaticResource {x:Static SystemColors.ControlBrushKey}}" WindowStartupLocation="CenterScreen" Topmost="False">
10
    <Window.Resources>
11
        <ResourceDictionary>
12
            <ResourceDictionary.MergedDictionaries>
13
                <ResourceDictionary Source="..\PithosStyles.xaml" />
14
            </ResourceDictionary.MergedDictionaries>
15
            <BooleanToVisibilityConverter x:Key="BoolToVisible" />
16
        </ResourceDictionary>       
17
    </Window.Resources>
18
    <extToolkit:BusyIndicator IsBusy="{Binding IsBusy}" BusyContent="Loading Object Info ..." >
19
        <Grid>
20
            <Grid.RowDefinitions>
21
                <RowDefinition Height="Auto"/>
22
                <RowDefinition Height="*"/>
23
                <RowDefinition Height="Auto"/>
24
            </Grid.RowDefinitions>
25

    
26
            <Grid Grid.Row="0">
27
                <Grid.ColumnDefinitions>
28
                    <ColumnDefinition Width="Auto"/>
29
                    <ColumnDefinition Width="*"/>
30
                    <ColumnDefinition Width="Auto"/>
31
                </Grid.ColumnDefinitions>
32
                <Image x:Name="FileIcon" Width="48" Height="48" Margin="5" Grid.Column="0" Stretch="None"/>
33
                <StackPanel Margin="5" Grid.Column="1">
34
                    <TextBlock x:Name="FileName" Grid.Row="0" Text="File Name" FontSize="16" FontWeight="Bold"/>
35
                    <StackPanel Orientation="Horizontal" Grid.Row="1">
36
                        <TextBlock Text="Container: " />
37
                        <TextBlock x:Name="Container" Text="Container" />
38
                    </StackPanel>
39
                </StackPanel>
40
                <TextBlock x:Name="ShortSize" Text="345 KB" FontWeight="Bold" FontSize="14" Grid.Column="2" HorizontalAlignment="Left" Margin="5"/>
41
            </Grid>
42
            <TabControl Grid.Row="1">
43
                <TabItem Header="General">
44
                    <Grid>
45
                        <Grid.Resources>
46
                            <Style x:Key="NameColumnStyle" TargetType="TextBlock">
47
                                <Setter Property="HorizontalAlignment" Value="Right"/>
48
                                <Setter Property="Margin" Value="5,2"/>
49
                            </Style>
50
                            <Style x:Key="ValueColumnStyle" TargetType="TextBlock">
51
                                <Setter Property="HorizontalAlignment" Value="Left"/>
52
                                <Setter Property="Margin" Value="5,2"/>
53
                            </Style>
54
                        </Grid.Resources>
55
                        <Grid.ColumnDefinitions>
56
                            <ColumnDefinition Width="Auto" />
57
                            <ColumnDefinition Width="*"/>
58
                        </Grid.ColumnDefinitions>
59
                        <Grid.RowDefinitions>
60
                            <RowDefinition Height="Auto"/>
61
                            <RowDefinition Height="Auto"/>
62
                            <RowDefinition Height="Auto"/>
63
                            <RowDefinition Height="Auto"/>
64
                            <RowDefinition Height="Auto"/>
65
                            <RowDefinition Height="Auto"/>
66
                        </Grid.RowDefinitions>
67
                        <TextBlock Text="Kind :" Grid.Row="0" Grid.Column="0" Style="{StaticResource ResourceKey=NameColumnStyle}"/>
68
                        <TextBlock Text="Size :" Grid.Row="1" Grid.Column="0" Style="{StaticResource ResourceKey=NameColumnStyle}"/>
69
                        <TextBlock Text="Where :" Grid.Row="2" Grid.Column="0" Style="{StaticResource ResourceKey=NameColumnStyle}"/>
70
                        <TextBlock Text="Modified :" Grid.Row="3" Grid.Column="0" Style="{StaticResource ResourceKey=NameColumnStyle}"/>
71
                        <TextBlock Text="Modified By :" Grid.Row="4" Grid.Column="0" Style="{StaticResource ResourceKey=NameColumnStyle}"/>
72
                        <TextBlock Text="Version :" Grid.Row="5" Grid.Column="0" Style="{StaticResource ResourceKey=NameColumnStyle}"/>
73
                        <TextBlock x:Name="Kind" Text="application/pdf" Grid.Row="0" Grid.Column="1" Style="{StaticResource ResourceKey=ValueColumnStyle}"/>
74
                        <TextBlock x:Name="Size" Text="345 KB (345,332 bytes)" Grid.Row="1" Grid.Column="1" Style="{StaticResource ResourceKey=ValueColumnStyle}"/>
75
                        <TextBlock x:Name="Where" Text="pithos/somefile.pdf" Grid.Row="2" Grid.Column="1" Style="{StaticResource ResourceKey=ValueColumnStyle}"/>
76
                        <TextBlock x:Name="Modified" Text="28/10/2011 11:34 AM" Grid.Row="3" Grid.Column="1" Style="{StaticResource ResourceKey=ValueColumnStyle}"/>
77
                        <TextBlock x:Name="ModifiedBy" Text="SomeUser" Grid.Row="4" Grid.Column="1" Style="{StaticResource ResourceKey=ValueColumnStyle}"/>
78
                        <TextBlock x:Name="Version" Text="2345456" Grid.Row="5" Grid.Column="1" Style="{StaticResource ResourceKey=ValueColumnStyle}"/>
79
                    </Grid>
80
                </TabItem>
81
                <TabItem Header="Metadata">
82
                    <DataGrid ItemsSource="{Binding Tags}" x:Name="Tags"
83
                    AutoGenerateColumns="False" CanUserAddRows="True" >
84
                        <DataGrid.Columns>
85
                            <DataGridTemplateColumn >
86
                                <DataGridTemplateColumn.CellTemplate>
87
                                    <DataTemplate>
88
                                        <Button Content=" - " Command="DataGrid.DeleteCommand"/>
89
                                    </DataTemplate>
90
                                </DataGridTemplateColumn.CellTemplate>
91
                            </DataGridTemplateColumn>
92
                            <DataGridTextColumn Binding="{Binding Name}" Header="Key" />
93
                            <DataGridTextColumn Binding="{Binding Value}" Header="Value"  />
94
                        </DataGrid.Columns>
95
                    </DataGrid>
96
                </TabItem>
97
                <TabItem Header="Permissions">
98
                    <StackPanel>
99
                        <TextBlock Margin="5" Visibility="{Binding Path=IsPublic,FallbackValue=Collapsed, Converter={StaticResource BoolToVisible}}">
100
                <Run Text="Public URL:" />
101
                <Run Text="{Binding PublicUrl,FallbackValue='http://someurl'}" />
102
                        </TextBlock>
103
                        <CheckBox x:Name="IsPublic" Content="Public" Margin="5"/>
104
                        <DataGrid ItemsSource="{Binding Permissions}" 
105
                AutoGenerateColumns="False" CanUserAddRows="True">
106
                            <DataGrid.Columns>
107
                                <DataGridTemplateColumn >
108
                                    <DataGridTemplateColumn.CellTemplate>
109
                                        <DataTemplate>
110
                                            <Button Content=" - " Command="DataGrid.DeleteCommand"/>
111
                                        </DataTemplate>
112
                                    </DataGridTemplateColumn.CellTemplate>
113
                                </DataGridTemplateColumn>
114
                                <DataGridTextColumn Binding="{Binding UserName}" Header="Name"  />
115
                                <DataGridCheckBoxColumn Binding="{Binding Read}" Header="Read"/>
116
                                <DataGridCheckBoxColumn Binding="{Binding Write}" Header="Write"/>
117
                            </DataGrid.Columns>
118
                        </DataGrid>
119
                    </StackPanel>
120
                </TabItem>
121
                <!--<TabItem Header="Other">
122
                    <Grid>
123
                        <Grid.Resources>
124
                            <Style x:Key="NameColumnStyle" TargetType="TextBlock">
125
                                <Setter Property="HorizontalAlignment" Value="Right"/>
126
                                <Setter Property="Margin" Value="5,2"/>
127
                            </Style>
128
                            <Style x:Key="ValueColumnStyle" TargetType="TextBox">
129
                                <Setter Property="HorizontalAlignment" Value="Stretch"/>
130
                                <Setter Property="VerticalAlignment" Value="Top"/>
131
                                <Setter Property="Margin" Value="5,2"/>
132
                            </Style>
133
                        </Grid.Resources>
134
                        <Grid.ColumnDefinitions>
135
                            <ColumnDefinition Width="Auto" />
136
                            <ColumnDefinition Width="*"/>
137
                        </Grid.ColumnDefinitions>
138
                        <Grid.RowDefinitions>
139
                            <RowDefinition Height="Auto"/>
140
                            <RowDefinition Height="Auto"/>
141
                            <RowDefinition Height="Auto"/>
142
                        </Grid.RowDefinitions>
143
                        <TextBlock Text="Content Encoding :" Grid.Row="0" Grid.Column="0" Style="{StaticResource ResourceKey=NameColumnStyle}"/>
144
                        <TextBlock Text="Content Disposition :" Grid.Row="1" Grid.Column="0" Style="{StaticResource ResourceKey=NameColumnStyle}"/>
145
                        <TextBlock Text="Manifest :" Grid.Row="2" Grid.Column="0" Style="{StaticResource ResourceKey=NameColumnStyle}"/>
146
                        <TextBox x:Name="ContentEncoding" Text="text/utf8" Grid.Row="0" Grid.Column="1" Style="{StaticResource ResourceKey=ValueColumnStyle}"/>
147
                        <TextBox x:Name="ContentDisposition" Grid.Row="1" Grid.Column="1" Style="{StaticResource ResourceKey=ValueColumnStyle}"/>
148
                        <TextBox x:Name="Manifest" Grid.Row="2" Grid.Column="1" Style="{StaticResource ResourceKey=ValueColumnStyle}"/>
149
                    </Grid>
150
                </TabItem>-->
151
            </TabControl>
152
            <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Right">
153
                <Button Name="SaveChanges" Content="OK" Margin="5,5,10,5" Style="{StaticResource ButtonStyle}" IsDefault="False" />
154
                <Button Name="RejectChanges" Content="Cancel" Margin="5,5,10,5" Style="{StaticResource ButtonStyle}" IsCancel="True" />
155
                <Button Name="ApplyChanges" Content="Apply" Style="{StaticResource ButtonStyle}" />
156
            </StackPanel>
157

    
158
        </Grid>
159
    </extToolkit:BusyIndicator>
160
</Window>