Cannot edit Dockresizer

3 posts, 0 answers
  1. Dietmar
    Dietmar avatar
    13 posts
    Member since:
    Dec 2017

    Posted 25 Jun 2019 Link to this post

    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. Vicky
    Admin
    Vicky avatar
    20 posts

    Posted 27 Jun 2019 Link to this post

    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.
  3. Dietmar
    Dietmar avatar
    13 posts
    Member since:
    Dec 2017

    Posted 15 Jul 2019 in reply to Vicky Link to this post

    Hi!

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

    Best regards!

Back to Top