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

Show SettingsPane automatically when new raddiagramitem is dropped into diagram

3 Answers 64 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Fredrik
Top achievements
Rank 1
Fredrik asked on 11 Sep 2014, 08:56 AM
When draging a toolboxitem from the toolbox gallery into the diagram is it possible to automatically open the SettingsPane ?

I have the following scenario: The user drags components from the toolbox into the diagram , the components have a few mandatory properties that needs to be set in its business object. My strategy is to put a form for the input of these properties in the SettingsPane and have this open whenever a new component is dropped into the diagram.

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 12 Sep 2014, 10:21 AM
Hello Fredrik,

You can use the Drop event handler of the RadDiagram and in it set the IsActive property of the SettingsPane to true in Dispatcher.BeginInvoke body.

You can check this approach implemented in the attached project for your convenience.

Regards,
Petar Mladenov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Fredrik
Top achievements
Rank 1
answered on 18 Sep 2014, 07:12 AM
Thank you that works fine.

I found a small bugg in your code (it is also present in your examples online).
in Example.xaml.cs add

Using System.Globalization

and in DefaultSerializationService_ItemSerializing
Add CultureInfo.Invariant culture as a parameter to the Geometry.ToString method like so
e.SerializationInfo["MyGeometry"] = (e.Entity as RadDiagramShape).Geometry.ToString(CultureInfo.InvariantCulture);

Otherwise it throws an exception when you drop figures into the diagram. I am on a swedish Win 7 installation i am guessing this is the cause.
0
Petar Mladenov
Telerik team
answered on 19 Sep 2014, 06:56 AM
Hi Fredrik,

Thank you for reporting these issues. We will try have them fixed in our demos for Q3 2014 in the next month. We updated your telerik account points as a thanks for your cooperation.

Regards,
Petar Mladenov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Diagram
Asked by
Fredrik
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Fredrik
Top achievements
Rank 1
Share this question
or