我正在學習WPF和NavigationWindow。我想添加東西到窗口,如狀態欄,喜歡的酒吧等。 不幸的是,當我嘗試添加任何東西,我得到一個錯誤。帶有更多控件的WPF導航窗口
我希望可能有一種方式,可以將頁面標記爲有人在他們之間瀏覽的書籤;讓用戶將頁面拖動到最喜歡的欄。
與狀態欄類似的東西;我希望在狀態欄上具有特定於頁面的信息,而不必在每個單獨的頁面上都有。
這是可能與一個導航窗口,或者我吠叫錯誤的樹?
編輯:
<NavigationWindow x:Class="Window2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Nav Test" Height="300" Width="300" Source="Window1.xaml" >
<StatusBar></StatusBar> ' The type 'NavigationWindow' does not support direct content.
</NavigationWindow>
更新,我去了什麼:
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Tracks" Height="350" Width="525">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="20" />
<RowDefinition Height="26" />
<RowDefinition Height="265*" />
</Grid.RowDefinitions>
<Menu Name="Menu1" />
<Frame Grid.Row="2" Name="Frame1" Source="PageSearchResults.xaml" />
<ToolBar Grid.Row="1" Name="ToolBar1" >
<Button Content="+" Name="Button1" />
</ToolBar>
</Grid>
</Window>
我最後決定將個人頁面的狀態欄,這樣我可以更容易地改變什麼從頁面顯示的到頁面,但工具欄與框架很好地配合。
你可以發佈你的代碼和你得到的錯誤消息嗎? – bendewey 2011-04-26 19:03:59