窗口中间的标题 [英] title on middle of the window

查看:46
本文介绍了窗口中间的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在窗口中间添加标题(工具栏全宽示例).
请打扰我!

I want to add title(ToolBar Full Width Sample) in the middle of window.
Please hellp me!

<Window

  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

  x:Class="Window1"

  Title="ToolBar Full Width Sample" Height="300" Width="300"

  Background="#FFFFFFFF">

  <Grid>


      </Grid>
</Window>

推荐答案

您需要添加
TextBlock.TextAlignment="Center"

获取

to get

<Window

  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

  x:Class="Window1"

  Title="ToolBar Full Width Sample" Height="300" Width="300"

  Background="#FFFFFFFF" TextBlock.TextAlignment="Center">
  <Grid>
  </Grid>
</Window>


这篇关于窗口中间的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆