我想了解Caliburn.Micro
附帶的HelloScreens
樣本。 ShellView.xaml
包括在底部的ContentControl
。有人可以解釋這個元素的重要性嗎?我試圖評論它沒有看到任何區別。Caliburn.Micro,HelloScreens-sample
<UserControl x:Class="Caliburn.Micro.HelloScreens.Shell.ShellView"
xmlns:...>
<Grid>
<local:TiledBackground SourceUri="/Resources/Images/backgroundtexture.png" />
<Image Source="/Resources/Images/backgroundshadow.png"
Stretch="Fill" />
<ct:DockPanel>
<.../>
</ct:DockPanel>
<!-- Whats this one for? --/>
<ContentControl x:Name="Dialogs"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Stretch"/>
</Grid>
</UserControl>
它綁定到的ViewModels Dialogs
- 屬性,這是一個IConductActiveItem
定製實現,但它是什麼用的?
啊哈!我錯過了那一個。我還沒有詳細看過對話框,但假設他們住在每個工作區內。所以當我刪除內容控件,並且工作區之間的切換仍然有效時,我開始相信對話管理員根本沒有任務... 非常感謝! – Vegar
所以這裏是問題..應該使用窗口還是這個方法? – GorillaApe
任何一種技術都是有效的,這取決於你希望你的對話框是一個模態窗口,還是內容覆蓋當前窗口。 – devdigital