0

如何更改 Windows 8 XAML 应用程序中的默认页眉?问题很简单,只是我还在学习XAML。

<Page.DataContext>
    <local:MainPageViewModel/>
</Page.DataContext>
<!-- PageAdornerControl displays the back button and a page title -->
<Layout:PageAdornerControl
        Background="{StaticResource ApplicationPageBackgroundThemeBrush}"
        Header="{Binding Header}">

我将标题视为文本。我的第一个想法是将 {Binding Header} 更改为 {Binding },但是将鼠标悬停在 Header 上会显示这是一些有效的东西。另外,我想使用 Visual Studio 2012 属性窗口来更改文本。

4

1 回答 1

2

There might be other ways, and I am still less than green with XAML, but here is one way using Nate's pageAdornerControl method.

  1. Place the cursor on the Layout:PageAdornerControl in the XAML code area.
  2. Go to the properties window, which should show the type as PageAdornerControl.
  3. Scroll down to header
  4. From the dropdown list, select Go to Source
  5. You will now see another section of code highlighted.
  6. Go to the properties window and the Header attribute will be the actual header text, which you can edit.
于 2013-05-22T19:04:47.603 回答