<Window x:Class="Pithos.Client.WPF.MessageView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- Title="MessageView" Height="300" Width="500" Background="{StaticResource {x:Static SystemColors.ControlBrushKey}}" WindowStartupLocation="CenterScreen" Icon="/Pithos.Client.WPF;component/Images/PithosTaskbar.png">
+ Title="MessageView" Height="Auto" Width="500"
+ Background="{StaticResource {x:Static SystemColors.ControlBrushKey}}"
+ WindowStartupLocation="CenterScreen"
+ Icon="/Pithos.Client.WPF;component/Images/PithosTaskbar.png"
+ SizeToContent="Height" xmlns:my="clr-namespace:Microsoft.Windows.Controls.Core.Converters;assembly=WPFToolkit.Extended">
<Window.CommandBindings>
<CommandBinding Command="ApplicationCommands.Close"
Executed="OnClose"/>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../PithosStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
+ <BooleanToVisibilityConverter x:Key="BoolToVisible" />
</ResourceDictionary>
</Window.Resources>
<Grid x:Name="LayoutRoot" Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Text="{Binding Message,FallbackValue='Error Message'}" Grid.Row="0" TextWrapping="WrapWithOverflow" Margin="0,5,0,10"/>
- <ListBox ItemsSource="{Binding Path=UserMessages}" Grid.Row="1">
+ <!--<Expander Grid.Row="1" Header="Details" IsExpanded="False" VerticalContentAlignment="Stretch">-->
+ <ListBox ItemsSource="{Binding Path=UserMessages}" Grid.Row="2" Visibility="{Binding ElementName=ShowDetails, Path=IsChecked, Converter={StaticResource BoolToVisible}}" >
<ListBox.ItemTemplate>
<DataTemplate>
<Expander Header="{Binding Message,FallbackValue='Seems we have a problem'}" FontWeight="Bold">
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
- <Grid Grid.Row="2" Margin="5,10">
- <Button x:Name="Copy" Content="Copy" ToolTip="Copy to Clipboard" HorizontalAlignment="Left" Style="{StaticResource MediumButton}" Command="Copy"/>
- <Button x:Name="SendFeedback" Content="Send" HorizontalAlignment="Center" Grid.Row="2" Style="{StaticResource MediumButton}" Click="OnSend" />
- <Button x:Name="OKButton" Content="Close" HorizontalAlignment="Right" Grid.Row="2" IsDefault="True" Style="{StaticResource MediumButton}" Command="Close" />
+ <!--</Expander>-->
+ <Grid Grid.Row="3">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <ToggleButton x:Name="ShowDetails" Grid.Column="0" Content="Show Details" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="5,2" Margin="5"/>
+ <Grid Margin="5,10" Width="300" HorizontalAlignment="Right" Grid.Column="1">
+ <Button x:Name="Copy" Content="Copy" ToolTip="Copy to Clipboard" HorizontalAlignment="Left" Style="{StaticResource MediumButton}" Command="Copy"/>
+ <Button x:Name="SendFeedback" Content="Send" HorizontalAlignment="Center" Grid.Row="2" Style="{StaticResource MediumButton}" Click="OnSend" />
+ <Button x:Name="OKButton" Content="Close" HorizontalAlignment="Right" Grid.Row="2" IsDefault="True" Style="{StaticResource MediumButton}" Command="Close" />
+ </Grid>
</Grid>
</Grid>
</Window>