Multiple Views
I want to have multiple views associated with a part and want to load different view in different scenarios. How I can do this?
Thanks
AllTec
I want to have multiple views associated with a part and want to load different view in different scenarios. How I can do this?
Thanks
AllTec
You can associate a view with a part by setting the attribute "ViewExtensionInfo", in the PartView.xaml.cs file set the fourth parameter to the your Part's PartViewContract:
[
ViewExtensionInfo(DefaultViewTechnologies.WindowsPresentationFoundation, "PartView Title", "PartView Description", typeof(IAcropolisPart1ViewContract))]
Also, to load different view in different scenarios, you do so by setting the PartPane's PartViewType to the specified view.
For example, given a <SomePart> that has 2 views <SomePartView1> and <SomePartView2>, you can programatically set the PartPane.PartViewType to the view you want, or you can do this in XAML:
<PartPane Part="<SomePart>" PartViewType="{x:Type <SomePartView2>}/>