Document window does not show the contents after it has been rafted

Docking/MDI for WPF Forum

Posted 12 years ago by Vikas Rao - Software Design Engineer, Tektronix
Version: 11.2.0551
Avatar

One of the document window contents needs to change at runtime based on the user action. So in the XAML I have used the content property of document window and it is bound to a property in my viewmodel.

<docking:DocumentWindow Header="Home" Content="{Binding CurrentHomeView}">

The CurrentHomeView property is a type of base viewmodel class. Two viewmodel classes representing different views are derived from this base class and one of them is assigned and the corresponding view is picked up by the DataTemplate defined in the XAML file.

This works fine and the view changes based on user action till the time the document window is within the main window. Once the document is moved out as a separate window it just shows the name of the viewmodel class instead of view. So it looks like it is not able to find the corresponding view.

Is there something that I am missing to get this working while is the document window is moved out?

Comments (2)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Vikas,

I'm assuming you are using implicit DataTemplates in order to associated your view with your view model. You would need to ensure that this implicit Style is defined in your Application.Resources, not the Window.Resources (as the latter will not be used by any rafting windows).


Actipro Software Support

Posted 12 years ago by Vikas Rao - Software Design Engineer, Tektronix
Avatar

Yes Thanks that solved it. The implicit Datatemplate was defined in window resources. After moving to Application.Resources, I am now able to see the contents even after rafting.

Thanks

VIkas Rao

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.