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

RadPanes Loosing their Header when Floating

3 Answers 231 Views
Docking
This is a migrated thread and some comments may be shown as answers.
BERTHET
Top achievements
Rank 1
BERTHET asked on 12 Feb 2020, 01:54 PM

Hello there, I have two questions in here :

 

I've been trying for some time to keep the header of my RadPanes when i make them float but nothing seems to work.

As you can see on the attached files :

   - IMG1 : How it looks like originally ;

   - IMG2 : When I make a single Pane float, the PaneHeader disappears,

   - IMG3 : When I move a second pane to the floating window, both PaneHeaders appear, but then the ToolWindow has none.

 

My assumption is that my PaneHeader is shown only if the RadPane is contained in a RadPaneGroup, and that it is otherwise used to generated the ToolWindow's one, loosing its style on the way.

So as soon as I add another RadPane, a RadPaneGroup is generated and PaneHeaders are restored, but then the ToolWindow has nothing to use as its Header.

It looks like modifying the ToolWindow's ControlTemplate isn't enough, though (even without the fact that it randomly crashes when launched).

 

If you have any solution for this please let me know.

 

The second question is this one :

Is it possible to change the behavior of the ToolWindow's generation by directly modifying the method that is called at this moment ? I couldn't find any documentation about this, neither did I manage to find which function is doing it. 

But my guess is that there is a method somewhere that either directly casts the RadPane into a ToolWindow (which would explain the messy stuff I get) or translates only certain attributes from the Pane to the Window.

Either way, if it is possible to change it, that's how I would prefer to do it.

 

That's it, thank you in advance for your help.

3 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 17 Feb 2020, 07:38 AM

Hello,

Thank you for the provided images.

I will directly answer your second question as I cannot offer a concrete solution for your particular scenario without a sample application in which to test it. If you would be kind enough to provide such, I'd be more than happy to further investigate and assist you.

As for your question, I believe you're looking for the ToolWindowCreated event in which you can access the created window. Please let me know whether you find this event helpful.

On a side note, please have in mind that the RadPane loses its DataContext when it's made floating since it is hosted in a ToolWindow. In order to preserve any bindings applied to the RadPane properties, you can explicitly set the DataContext on the RadPane itself.

Regards,
Dilyan Traykov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
BERTHET
Top achievements
Rank 1
answered on 17 Feb 2020, 09:58 AM

Hello Dilyan, thank you for your answer.

I've actually already looked at the ToolWindowCreated Event but didn't really find how top achieve what I want in it. I've also tried modifying the OpenInToolWindow method by overriding the RadDocking control. Unfortunately, this didn't work out since it accesses a lot of internal and private fields and methods.

So I kinda guessed that this wasn't the best solution to pursue.

What I'm looking for would either be to set the ToolWindow's Header by copying the RadPane's one, or to display the RadPane's Header, and hiding the ToolWindow's one (which actually, while thinking of it, wouldn't allow to drag the window anymore, I think).

 

Also, as you can see on the third picture, I have no problem with my DataContexts, since they are all defined in separate files referenced in the App.xaml.

 

I would really appreciate further advice, thank you again for your answer though.

 

Regards,

Berthet

0
Dilyan Traykov
Telerik team
answered on 19 Feb 2020, 01:19 PM

Hello Berthet,

I'm sorry to hear that the ToolWindowCreated event will not work for you.

Would you find it possible to demonstrate this issue in a small sample project so that I can try to come up with a concrete solution for your specific setup?

Thank you in advance for your cooperation on the matter.

Regards,
Dilyan Traykov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Docking
Asked by
BERTHET
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
BERTHET
Top achievements
Rank 1
Share this question
or