通过调整窗口大小来移动文本

时间:2018-09-28 19:17:05

标签: xaml

当窗口位于较小分辨率的屏幕尺寸上时,中间的文本("NoSuggestionsBody")不会随之动态变化,而是停留在原始尺寸窗口的中央。

我试图在Grid中创建一个列定义,但该文本并未更改为动态。

<Grid x:Name="uiContentGrid">
  <Grid.RowDefinitions>
     <RowDefinition Height="0"/>
     <RowDefinition/>
  </Grid.RowDefinitions>

  <DockPanel DockPanel.Dock="Top" LastChildFill="False" Background="#EBEFF2" Grid.Row="0" Grid.RowSpan="2">
    <!--This is the Suggested Templates View.-->
    <custom:TemplateCardView x:Name="uiTemplateCardView" UseClick="UseTemplate_Click" DockPanel.Dock="Top" Visibility="Visible"/>
    <!--This is the Static String shown in case of an Email Chain-->
    <Border Height="556" DockPanel.Dock="Top">
       <TextBlock Name="NoSuggestionsBody" Foreground="#546e7a" DockPanel.Dock="Top" HorizontalAlignment="Center" VerticalAlignment="Center" LineHeight="1.83" FontFamily="HelveticaNeue" FontSize="12px" FontWeight="Normal"/>
    </Border>
  </DockPanel>

enter image description here

enter image description here

0 个答案:

没有答案