This is a migrated thread and some comments may be shown as answers.

Radpane MVVM floating issue

6 Answers 217 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Jurgen
Top achievements
Rank 1
Jurgen asked on 23 Oct 2012, 07:57 AM
I have a radpane which can have different viewmodels as a datatemplate. I attached my object to the content of the radpane.
When the pane is docked there is not issue, but when the pane is in the floating state, the templated control only shows the datatype of the viewmodel.

 <telerik:RadPane x:Name="paneManufacturers" 
                 Header="{x:Static Properties:Resources.LabelLibraryExplorer}"
           Content="{Binding AvailableItems}">
</telerik:RadPane>

6 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 25 Oct 2012, 03:28 PM
Hi Jurgen,

 
Thank you for contacting us.

I am not sure what could be the cause of the problem, but I could give a hint. Please, note that when a pane goes floating, it's placed in another window and it's not in the same visual tree as the RadDocking control. This means that if the DataTemplates are placed in the MainWindow.Resources, they won't be applied for the floating panes(as I note, floating panes are in another Windows). 

Hope this sheds some light on the problem.

Regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
D
Top achievements
Rank 1
answered on 04 Feb 2013, 09:47 AM
I've got exactly the same issue. I've tried to add datatemplate in toolwindow's style resources and nothing happened. What can you suggest?
0
George
Telerik team
answered on 07 Feb 2013, 08:30 AM
Hi,

Please, double check that the DataTemplates are defined in the app.xaml file, but not in the MainWindow.Resources.

Kind regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
D
Top achievements
Rank 1
answered on 07 Feb 2013, 01:20 PM
that solved my problem, but partially. First time my pane goes floating everything is OK. When I pin it and then try to move it, its content disappears.
0
George
Telerik team
answered on 11 Feb 2013, 07:51 AM
Hi,

Can you share some more details about this scenario? If you can send us a sample code, it would be of great help to pinpoint the problem.

Kind regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
D
Top achievements
Rank 1
answered on 11 Feb 2013, 11:23 AM
Thank you for you support! I've solved my issue. The reason why my datatemplate in app.resources didn't get applied was a WPF bug. When there's no styles declared in resourcedictionary, this dictionary is skipped, and WPF doesn't look inside. So, I only had my datatemplate in app resorcedictionary. I've added a default style and it started working!
Tags
Docking
Asked by
Jurgen
Top achievements
Rank 1
Answers by
George
Telerik team
D
Top achievements
Rank 1
Share this question
or