2014-01-06 77 views
3

如何將元素置於XAML Windows 8.1上?當設置保證金後全屏巨星應用程序我看到這一點: enter image description here中心內容XAML

<ProgressRing Name="Load" 
       IsActive="True" 
       HorizontalAlignment="Stretch" 
       Margin="672,373,674,373" 
       VerticalAlignment="Stretch" 
       Foreground="White"/> 

<TextBlock Margin="528,466,526,256" 
      TextWrapping="Wrap" 
      Text="Caricamento..." 
      FontSize="50" 
      IsRightTapEnabled="False" 
      IsHoldingEnabled="False" 
      IsDoubleTapEnabled="False" 
      IsTapEnabled="False" 
      Foreground="White"/> 

在編程模式我看到這一點: enter image description here

+0

horizo​​ntalALignment =「center」? – user1336827

+2

使用中心水平和垂直對齊並刪除邊距 –

回答

3

試試這個,使用HorizontalAlignmentVerticalAlignment中心。而不是利潤率。

<ProgressRing Name="Load" 
       IsActive="True" 
       HorizontalAlignment="Center" 
       VerticalAlignment="Center" 
       Foreground="White"/> 

<TextBlock TextWrapping="Wrap" 
      Text="Caricamento..." 
      FontSize="50" 
      HorizontalAlignment="Center" 
      VerticalAlignment="Center" 
      IsRightTapEnabled="False" 
      IsHoldingEnabled="False" 
      IsDoubleTapEnabled="False" 
      IsTapEnabled="False" 
      Foreground="White"/>