Revision f327ad2b trunk/Pithos.Client.WPF/Shell/MessageView.xaml

b/trunk/Pithos.Client.WPF/Shell/MessageView.xaml
1 1
<Window x:Class="Pithos.Client.WPF.MessageView"
2 2
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3 3
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
        Title="MessageView" Height="300" Width="500" Background="{StaticResource {x:Static SystemColors.ControlBrushKey}}" WindowStartupLocation="CenterScreen" Icon="/Pithos.Client.WPF;component/Images/PithosTaskbar.png">
4
        Title="MessageView" Height="Auto" Width="500" 
5
        Background="{StaticResource {x:Static SystemColors.ControlBrushKey}}" 
6
        WindowStartupLocation="CenterScreen" 
7
        Icon="/Pithos.Client.WPF;component/Images/PithosTaskbar.png"
8
        SizeToContent="Height" xmlns:my="clr-namespace:Microsoft.Windows.Controls.Core.Converters;assembly=WPFToolkit.Extended">
5 9
    <Window.CommandBindings>
6 10
        <CommandBinding Command="ApplicationCommands.Close"
7 11
                    Executed="OnClose"/>
......
13 17
            <ResourceDictionary.MergedDictionaries>
14 18
                <ResourceDictionary Source="../PithosStyles.xaml" />
15 19
            </ResourceDictionary.MergedDictionaries>
20
            <BooleanToVisibilityConverter x:Key="BoolToVisible" />
16 21
        </ResourceDictionary>
17 22
    </Window.Resources>
18 23

  
19 24
    <Grid x:Name="LayoutRoot" Margin="5">
20 25
        <Grid.RowDefinitions>
21 26
            <RowDefinition Height="Auto"/>
27
            <RowDefinition Height="Auto"/>
22 28
            <RowDefinition Height="*"/>
23 29
            <RowDefinition Height="Auto" />
24 30
        </Grid.RowDefinitions>
25 31
        <TextBlock Text="{Binding Message,FallbackValue='Error Message'}" Grid.Row="0" TextWrapping="WrapWithOverflow" Margin="0,5,0,10"/>
26
        <ListBox  ItemsSource="{Binding Path=UserMessages}" Grid.Row="1">
32
        <!--<Expander Grid.Row="1" Header="Details" IsExpanded="False" VerticalContentAlignment="Stretch">-->
33
            <ListBox  ItemsSource="{Binding Path=UserMessages}" Grid.Row="2" Visibility="{Binding ElementName=ShowDetails, Path=IsChecked, Converter={StaticResource BoolToVisible}}" >
27 34
            <ListBox.ItemTemplate>
28 35
                <DataTemplate>
29 36
                    <Expander Header="{Binding Message,FallbackValue='Seems we have a problem'}" FontWeight="Bold">
......
32 39
                </DataTemplate>
33 40
            </ListBox.ItemTemplate>
34 41
        </ListBox>
35
        <Grid Grid.Row="2" Margin="5,10">            
36
            <Button x:Name="Copy" Content="Copy" ToolTip="Copy to Clipboard" HorizontalAlignment="Left" Style="{StaticResource MediumButton}" Command="Copy"/>
37
            <Button x:Name="SendFeedback" Content="Send" HorizontalAlignment="Center" Grid.Row="2"  Style="{StaticResource MediumButton}" Click="OnSend" />
38
            <Button x:Name="OKButton" Content="Close" HorizontalAlignment="Right" Grid.Row="2" IsDefault="True" Style="{StaticResource MediumButton}" Command="Close"  />
42
        <!--</Expander>-->
43
        <Grid Grid.Row="3">
44
            <Grid.ColumnDefinitions>
45
                <ColumnDefinition Width="*"/>
46
                <ColumnDefinition Width="Auto"/>
47
            </Grid.ColumnDefinitions>
48
            <ToggleButton x:Name="ShowDetails"  Grid.Column="0" Content="Show Details" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="5,2" Margin="5"/>
49
            <Grid Margin="5,10" Width="300" HorizontalAlignment="Right" Grid.Column="1">
50
                <Button x:Name="Copy" Content="Copy" ToolTip="Copy to Clipboard" HorizontalAlignment="Left" Style="{StaticResource MediumButton}" Command="Copy"/>
51
                <Button x:Name="SendFeedback" Content="Send" HorizontalAlignment="Center" Grid.Row="2"  Style="{StaticResource MediumButton}" Click="OnSend" />
52
                <Button x:Name="OKButton" Content="Close" HorizontalAlignment="Right" Grid.Row="2" IsDefault="True" Style="{StaticResource MediumButton}" Command="Close"  />
53
            </Grid>
39 54
        </Grid>
40 55
    </Grid>
41 56
</Window>

Also available in: Unified diff