Show SettingsPane automatically when new raddiagramitem is dropped into diagram

4 posts, 0 answers
  1. Fredrik
    Fredrik avatar
    6 posts
    Member since:
    Aug 2014

    Posted 11 Sep 2014 Link to this post

    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.

  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 12 Sep 2014 Link to this post

    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.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Fredrik
    Fredrik avatar
    6 posts
    Member since:
    Aug 2014

    Posted 18 Sep 2014 in reply to Petar Mladenov Link to this post

    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.
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 19 Sep 2014 Link to this post

    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.
     
Back to Top