Statistics
| Branch: | Revision:

root / trunk / Pithos.Client.WPF / Shell / MessageView.xaml @ f327ad2b

History | View | Annotate | Download (3.3 kB)

1
<Window x:Class="Pithos.Client.WPF.MessageView"
2
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
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">
9
    <Window.CommandBindings>
10
        <CommandBinding Command="ApplicationCommands.Close"
11
                    Executed="OnClose"/>
12
        <CommandBinding Command="ApplicationCommands.Copy"
13
                    Executed="OnCopy"/>
14
    </Window.CommandBindings>
15
    <Window.Resources>
16
        <ResourceDictionary>
17
            <ResourceDictionary.MergedDictionaries>
18
                <ResourceDictionary Source="../PithosStyles.xaml" />
19
            </ResourceDictionary.MergedDictionaries>
20
            <BooleanToVisibilityConverter x:Key="BoolToVisible" />
21
        </ResourceDictionary>
22
    </Window.Resources>
23

    
24
    <Grid x:Name="LayoutRoot" Margin="5">
25
        <Grid.RowDefinitions>
26
            <RowDefinition Height="Auto"/>
27
            <RowDefinition Height="Auto"/>
28
            <RowDefinition Height="*"/>
29
            <RowDefinition Height="Auto" />
30
        </Grid.RowDefinitions>
31
        <TextBlock Text="{Binding Message,FallbackValue='Error Message'}" Grid.Row="0" TextWrapping="WrapWithOverflow" Margin="0,5,0,10"/>
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}}" >
34
            <ListBox.ItemTemplate>
35
                <DataTemplate>
36
                    <Expander Header="{Binding Message,FallbackValue='Seems we have a problem'}" FontWeight="Bold">
37
                        <TextBlock Text="{Binding Details,FallbackValue='This is a message'}" FontWeight="Normal" TextWrapping="Wrap" />
38
                    </Expander>
39
                </DataTemplate>
40
            </ListBox.ItemTemplate>
41
        </ListBox>
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>
54
        </Grid>
55
    </Grid>
56
</Window>