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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change the image for Connector on SymbolPalette

Thread ID:





83738 Jun 27,2009 12:27 AM UTC Jun 29,2009 11:07 AM UTC WPF 1
Tags: Diagram
Kevin Ashley
Asked On June 27, 2009 12:27 AM UTC

Can I change the shape of connector in the SymbolPalette? Say, I want to make it any bitmap?

Nikhil A [Syncfusion]
Replied On June 29, 2009 11:07 AM UTC

Hi Kevin,

Thanks for your interest in Syncfusion products.

Yes the shape of the connector in the palette can be changed to whatever you want.

It can be done in the following way:

As the Connector is the second group in the palette, we can access the group using the SymbolGroups[int index] property of SymbolPalette, and then the corresponding item can be accessed in the same way by using the Items[int index] property of SymbolPaletteGroup.

Code Snippet:
BitmapImage bi = new BitmapImage();
bi.UriSource = new Uri(@"D:\Images\ortho.png", UriKind.RelativeOrAbsolute);
Image i = new Image();
i.Source = bi;

((diagramControl.SymbolPalette.SymbolGroups[1] as SymbolPaletteGroup).Items[0] as SymbolPaletteItem).Content = i;

The above line specifies the content of the first item(index 0)of the second group (index 1, "Connectors") of the SymbolPalette.

In this way the corresponding item of the group can be accessed and the content can be changed.

Please let us know if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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