Use DockPanel instead of StackPanel to use all the space OUT-587
authorThomas
Fri, 09 Aug 2019 14:06:19 +0200
branchOUT-587
changeset 2700b17a58d4461a
parent 2699 48ccff541ad6
child 2701 727366b902e3
Use DockPanel instead of StackPanel to use all the space
UI/FormControlPreviewMessage.xaml
     1.1 --- a/UI/FormControlPreviewMessage.xaml	Fri Aug 09 13:47:06 2019 +0200
     1.2 +++ b/UI/FormControlPreviewMessage.xaml	Fri Aug 09 14:06:19 2019 +0200
     1.3 @@ -42,11 +42,12 @@
     1.4              </ResourceDictionary.MergedDictionaries>
     1.5          </ResourceDictionary>
     1.6      </UserControl.Resources>
     1.7 -    <StackPanel Name="StackPanelLayoutRoot"
     1.8 +    <DockPanel Name="DockPanelLayoutRoot"
     1.9                  Margin="5">
    1.10  
    1.11          <!--'Preview' text-->
    1.12 -        <TextBlock Text="{x:Static p:Resources.PreviewMessage_PreviewText}"
    1.13 +        <TextBlock DockPanel.Dock="Top"
    1.14 +                   Text="{x:Static p:Resources.PreviewMessage_PreviewText}"
    1.15                     FontFamily="Segoe UI"
    1.16                     FontSize="12"
    1.17                     TextAlignment="Right"
    1.18 @@ -56,7 +57,8 @@
    1.19                     Visibility="{Binding IsNoteModeEnabled, Mode=OneWay, Converter={StaticResource InvertBoolToVisibility}}" />
    1.20  
    1.21          <!--Subject-->
    1.22 -        <TextBox Background="Transparent"
    1.23 +        <TextBox DockPanel.Dock="Top"
    1.24 +                 Background="Transparent"
    1.25                   BorderThickness="0"
    1.26                   IsReadOnly="True"
    1.27                   IsTabStop="False"
    1.28 @@ -69,7 +71,8 @@
    1.29                   VerticalAlignment="Center" />
    1.30  
    1.31          <!--Contact image, recipients and reply buttons-->
    1.32 -        <Grid Name="GridContactRecipients"
    1.33 +        <Grid DockPanel.Dock="Top"
    1.34 +              Name="GridContactRecipients"
    1.35                Visibility="{Binding IsNoteModeEnabled, Mode=OneWay, Converter={StaticResource InvertBoolToVisibility}}" >
    1.36              <Grid.ColumnDefinitions>
    1.37                  <ColumnDefinition Width="Auto" />
    1.38 @@ -255,9 +258,10 @@
    1.39          </Grid>
    1.40  
    1.41          <!--Attachments-->
    1.42 -        <ItemsControl  HorizontalAlignment="Stretch"
    1.43 -                          VerticalAlignment="Top"
    1.44 -                          ItemsSource="{Binding Message.Attachments, Mode=OneWay}">
    1.45 +        <ItemsControl DockPanel.Dock="Top"
    1.46 +                      HorizontalAlignment="Stretch"
    1.47 +                      VerticalAlignment="Top"
    1.48 +                      ItemsSource="{Binding Message.Attachments, Mode=OneWay}">
    1.49              <ItemsControl.Visibility>
    1.50                  <MultiBinding Converter="{StaticResource MultiBooleanToVisibility}">
    1.51                      <Binding Path="Message.Attachments"
    1.52 @@ -374,7 +378,8 @@
    1.53              </ItemsControl.ItemsPanel>
    1.54          </ItemsControl>
    1.55  
    1.56 -        <TextBlock x:Name="RemoteImagesWarning"
    1.57 +        <TextBlock x:Name="RemoteImagesWarning" 
    1.58 +                   DockPanel.Dock="Top"
    1.59                     Visibility="Collapsed"
    1.60                     Padding="5"
    1.61                     Text="{x:Static p:Resources.PreviewMessage_RemoteImagesWarningText}"
    1.62 @@ -395,11 +400,12 @@
    1.63          </TextBlock>
    1.64  
    1.65          <WebBrowser x:Name="WebBrowser"
    1.66 +                    DockPanel.Dock="Top"
    1.67                      HorizontalAlignment="Stretch"
    1.68                      VerticalAlignment="Stretch"
    1.69                      Margin="0,10,0,0"
    1.70                      Navigating="WebBrowser_Navigating"
    1.71                      Visibility="{Binding Path='IsNoteModeEnabled', Mode=OneWay, Converter={StaticResource InvertBoolToVisibility}}" />
    1.72  
    1.73 -    </StackPanel>
    1.74 +    </DockPanel>
    1.75  </UserControl>
    1.76 \ No newline at end of file