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

Cannot edit Dockresizer

2 Answers 81 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Dietmar
Top achievements
Rank 1
Dietmar asked on 25 Jun 2019, 06:07 PM

Hi,

I'm trying to change the borderbrush of the Dockresizer.

What I found out, is that the dockresizer is part of the RadSplitContainer.

I cannot create a template copy of that control because Blend throws an error (btw. I can create copies of other telerik controls like documentmanager).

Any ideas?

 

2 Answers, 1 is accepted

Sort by
0
Vicky
Telerik team
answered on 27 Jun 2019, 02:27 PM
Hi Dietmar,

The RadGridResizer (i.e. the RadDocking's resizer element) is a part of the RadSplitContainer, but due to its small width it is really hard to capture it in the Designer or Blend.
The mouse always captures the RadSplitContainer.

The great news is that there is an easy way to achieve the desired by you behavior and editing control templates is not needed in this case.

In order to change the DockResizer's look and feel, you need to define some custom styles:
  • If you need to change its normal state only, you need a Style with TargetType="telerik:RadGridResizer" which sets the Background property to the desired color:

    <Style TargetType="telerik:RadGridResizer" BasedOn="{StaticResource RadGridResizerStyle}">
        <Setter Property="Background" Value="#190099BC"/>
    </Style>


  • If you need to change its preview state (when dragging it in order to resize), you need to define a new Style with TargetType="Control" and set it as the PreviewStyle property​'s value in the above defined Style:

    <Style x:Key="ResizerPreviewStyle" TargetType="Control" BasedOn="{StaticResource GridResizerPreviewStyle}">
        <Setter Property="Background" Value="#4A1B7E"/>
    </Style>
    <Style TargetType="telerik:RadGridResizer" BasedOn="{StaticResource RadGridResizerStyle}">
        <Setter Property="Background" Value="#190099BC"/>
        <Setter Property="PreviewStyle" Value="{StaticResource ResizerPreviewStyle}"/>
    </Style>

For your convenience, I prepared a sample project that uses the suggested approach. The project uses the Fluent theme with the NoXaml version of the dlls.
Please, try it out and let me know if it helps you.

Best regards,
Vicky
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
Dietmar
Top achievements
Rank 1
answered on 15 Jul 2019, 08:45 AM

Hi!

Thank you, that helped a lot. This example should be part of the documentation.

Best regards!

Tags
Docking
Asked by
Dietmar
Top achievements
Rank 1
Answers by
Vicky
Telerik team
Dietmar
Top achievements
Rank 1
Share this question
or