)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the diagram thumb style

Platform: WPF |
Control: SfDiagram |
Published Date: October 8, 2018 |
Last Revised Date: November 8, 2019

Appearance of the DiagramThumb can be customized by using its Shape and ShapeStyle properties. This is the base for Segment, End, and Control thumbs of the connector. The ControlPointType property will differentiate the type of thumbs.

Refer to the following code example and sample to customize the thumbs of the connector.

Segment thumb (Orthogonal)

XAMLaml

<Style TargetType="Path" x:Key="OrthogonalThumbStyle">
  <Setter Property="Fill" Value="Black"/>
  <Setter Property="Stroke" Value="Yellow"/>
  <Setter Property="StrokeThickness" Value="1"/>
</Style>
 
<Style TargetType="Syncfusion:DiagramThumb">
  <Style.Triggers>
    <Trigger Property="ControlPointType" Value="HorizontalOrthogonalSegment">
       <Setter Property="Shape">
         <Setter.Value>
           <EllipseGeometry RadiusX="10" RadiusY="10" Center="0,0"/>
         </Setter.Value>
       </Setter>
       <Setter Property="ShapeStyle" Value="{StaticResource OrthogonalThumbStyle}"/>
    </Trigger>
    <Trigger Property="ControlPointType" Value="VerticalOrthogonalSegment">
      <Setter Property="Shape">
        <Setter.Value>
          <EllipseGeometry RadiusX="10" RadiusY="10" Center="0,0"/>
        </Setter.Value>
      </Setter>
      <Setter Property="ShapeStyle" Value="{StaticResource OrthogonalThumbStyle}"/>
    </Trigger>
   </Style.Triggers>
</Style>
 

 

Screenshot:

OrthogonalThumb                       

End thumb (Source/Target)

XAMLaml

<Style TargetType="Path" x:Key="EndThumbStyle">
  <Setter Property="Fill" Value="SkyBlue"/>
  <Setter Property="Stroke" Value="DarkBlue"/>
  <Setter Property="StrokeThickness" Value="1"/>
</Style>
 
<Style TargetType="Syncfusion:DiagramThumb">
  <Style.Triggers>
     <Trigger Property="ControlPointType" Value="SourcePoint">
        <Setter Property="Shape">
            <Setter.Value>
                <EllipseGeometry RadiusX="10" RadiusY="10" Center="0,0"/>
            </Setter.Value>
         </Setter>
        <Setter Property="ShapeStyle" Value="{StaticResource EndThumbStyle}"/>
     </Trigger>
     <Trigger Property="ControlPointType" Value="TargetPoint">
        <Setter Property="Shape">
            <Setter.Value>
                <EllipseGeometry RadiusX="10" RadiusY="10" Center="0,0"/>
            </Setter.Value>
        </Setter>
        <Setter Property="ShapeStyle" Value="{StaticResource EndThumbStyle}"/>
     </Trigger>
  </Style.Triggers>
</Style>

 

Screenshot:

EndThumb

 

Control thumb (CubicBezier)

XAMLaml

<Style TargetType="Syncfusion:DiagramThumb">
   <Style.Triggers>
       <Trigger Property="ControlPointType" Value="CubicCurveSegment">
            <Setter Property= "Shape">
               <Setter.Value>
                  <EllipseGeometry RadiusX="10" RadiusY="10" Center="0,0"/>
               </Setter.Value>
            </Setter>
            <Setter Property="ShapeStyle">
               <Setter.Value>
                  <Style TargetType="Path">
                    <Setter Property="Fill" Value="Yellow"/>
                    <Setter Property="Stroke" Value="Black"/>
                    <Setter Property="StrokeThickness" Value="1"/>
                  </Style>
               </Setter.Value>
            </Setter>
       </Trigger>
   </Style.Triggers>
</Style>

 

Screenshot:

CubicbezierThumb

Similarly, youwe can customize the Resizer, Rotator, and Pivot thumbs of the nNode.

Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ConnectorSegment-88190594

For more information about ControlPointType, click this link.please visit the below link.

Link : https://help.syncfusion.com/cr/Syncfusion.UI.Xaml.Diagram.Controls.ControlPointType.html

 

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment
Comments
Roger
Mar 13, 2020

Is it possible to do this through the code behind?

Reply
Karkuvel Rajan Shanmugavel [Syncfusion]
Mar 16, 2020

Hi Roger,

Requirement: Support to customize diagram thumb's style through code-behind.

Currently, SfDiagram doesn’t have support to achieve your requirement. We have logged the feature request for your requirement. We will implement this feature in any of our upcoming releases. We will update you once the feature is implemented.

The tracking status of your request can be done through the below feedback link:

Feedback link: https://www.syncfusion.com/feedback/12753/support-to-customize-diagram-thumbs-style-through-code-behind

Regards, Karkuvel Rajan S

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon