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.
Unfortunately, activation email could not send to your email. Please try again.

Import symbol palette from an *. file

Thread ID:

Created:

Updated:

Platform:

Replies:

84065 Jun 29,2009 04:23 AM Jun 30,2009 03:15 AM WPF 6
loading
Tags: Diagram
Veaceslav Cosulet
Asked On June 29, 2009 04:23 AM

How can I import a symbol palette from an *.edp file I've created with symbol designer? Is there any property anywhere in the class hierarchy of WPF diagram similar to PaletteGroupView.Palette in WinForms Diagram?
Thanks.
Best regards, Frank.

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

Hi Frank,

Thanks for your interest in Syncfusion products.

Essential Diagram for WPF does not support importing *.edp files created from Symbol Designer into the Symbol Palette. However items can be added to the SymbolPalette in the following way:

//SymbolPaletteFilter creates a filter for the palette groups.
SymbolPaletteFilter sfilter = new SymbolPaletteFilter();
sfilter.Label = "Custom";
diagramControl.SymbolPalette.SymbolFilters.Add(sfilter);

//SymbolPaletteGroup creates a group and assigns a specific filter index.
SymbolPaletteGroup s = new SymbolPaletteGroup();
s.Label = "Custom";
SymbolPalette.SetFilterIndexes(s, new Int32Collection(new int[] { 0, 6 }));
diagramControl.SymbolPalette.SymbolGroups.Add(s);

//SymbolPaletteItem specifies the item which can be added to the group.
SymbolPaletteItem ss = new SymbolPaletteItem();
Path path = App.Current.Resources["CustomShape"] as Path;
ss.Content = path;
s.Items.Add(ss);

In this way any number of groups or items can be added to the SymbolPalette.

For more details pls refer the online documentation from the link mentioned below:

http://help.syncfusion.com/User%20Interface/WPF/Diagram

Navigate to : Concepts and Features-->SymbolPalette

Please let us know if you have any concerns.

Regards,
Nikhil

Veaceslav Cosulet
Replied On June 29, 2009 08:31 AM

Do you mean I have to add a *.edp file to Resources.resx of the project and then add each symbol in palette to the Group? I just want to add symbol palettes created with symbol designer to a group. How add I a custom shape to the resources of the project? Could you please give more details? I've added the EDPs to project's resources, inserted your code into loaded event handler and changed the bellow code accordingly

Path path = App.Current.Resources[name of the resource] as Path;

but nothing happened. How can I create a custom symbol and add it to resources.resx?
Thanks,
best regards Frank.

Veaceslav Cosulet
Replied On June 29, 2009 08:39 AM

I meant to add a custom shape consisting of more shapes like ellipses and texts grouped together. I've created the with symbol designer and now want them in my WPF application. If it isn't possible through importing *.edp file, how else can add these custom shapes?

Veaceslav Cosulet
Replied On June 29, 2009 09:15 AM

Here is another questions. What are the differences between WinForms and WPF Diagram nodes? Are WPF nodes simple images added to corresponding palettes? What is the the alternative to symbol designer in WPF? I mean how can I create custom shapes/symbols like with symbol designer?
Thanks and best regards.

Nikhil A [Syncfusion]
Replied On June 30, 2009 12:05 AM

Hi Frank,

The Symbol Designer is a utility provided to create palettes which can be loaded in Windows Forms Diagram. Diagram WPF do.edp files. The SymbolPalette in Diagram WPF allows you to host any type of content like image, button, label, textbox etc..

In order to use complex shapes as Palette items, these shapes can be created using softwares namely Expression Blend, Expression Design or Adobe Illustrator(and many more). The Microsoft Expression Blend allows you to draw shapes using the common drawing tools and then it automatically creates the Data value for you to use it. The Microsoft Expression Blend will straight away give you this Data value. All you have to do is draw these shapes using any such software and use the option provided in those softwares to convert those shapes into Path from which the Data value can be obtained.

Therefore steps you can follow to create custom shapes are:

1) Use Expression Blend to draw shapes using the Drawing Tools.

2) Convert the shapes into a Path object.

3) Once the shape is converted to path, the matrix used to create the path can be obtained from the Data property of the path and can be specified as the content of the SymbolPaletteItem.is XAML content can then be specified as the content of t

4) You can also obtain the XAML of the shapes you draw using Microsoft Blend, and this can then be specified as the content of the palette item by defining it as a resource and using it.

An image can also be hosted as a palette item and therefore you can draw any shape you may want and save as bitmap image and host it inside the Symbol palette.

In this way, any content can be hosted inside the palette.


In WPF, the palette items are containers which can hold any object you want.


We have noticed you've submitted a number of specific technical inquiries here in the Forums which seem to indicate you are a current customer rather than an evaluator or tester. If so, you might like to know that you have an existing personal Direct-Trac account available using your own email address, and we highly recommend using your personal account. You'll get a faster response along with an automatic update when your question is answered via DirectTrac, and you can login and view your incident history 24x7. Simply visit https://www.syncfusion.com/Support/DirectTrac/logon.aspx?URL=/Support/DirectTrac/default.aspx to
login. If you have any further questions, we hope you will take advantage of your existing account and available services as a license holder.

Please let us know if you have any concerns.

Regards,
Nikhil

Veaceslav Cosulet
Replied On June 30, 2009 03:15 AM

Thanks Nikhil.
I'll try it with ExpresionBlend.
Best regards, Frank.

CONFIRMATION

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.

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.

;