我想只切換View的一部分(即UserControl)xaml。 例如,我想只能更改2nd Grid。在View中切換部分xaml(Caliburn.Micro)
<Grid> //main grid
<Grid Name="1" Grid.Row="1"/>
<Grid Name="2" Grid.Row="2"/>
</Grid
我已經試過某事像這樣:
<UserControl.Resources>
<ControlTemplate x:Key="UsualMode">
<Grid>
...
</Grid>
</ControlTemplate>
</UserControl.Resources>
<Grid> //main grid
<Grid Name="1" Grid.Row="1"/>
<ControlTemplate Name="2" Grid.Row="2" Template="{StaticResource UsualMode}"/>
</Grid>
然後,通過使用觸發器和結合我將能夠切換模板。 不幸的是,由於'Bootstrapper.cs not found'異常,這對我無效。 我該怎麼做?我不能使用導體 - >必須只加載一個視圖。
出你希望能夠在同一視圖模型切換視圖?如果Caliburn Micro支持這種開箱即用的方式,請查看「View.Context」附加屬性和CM文檔。 – Charleh
「我不能使用導體 - >必須只加載一個視圖。」 只有一個View,但這個View的內容可切換。 –