Button on Node!

2 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 11 Sep 2013 Link to this post

    Hi,

    i use your OrgChart example which work fine. Now i want to place a button on each node. This button is placed in the
    <telerik:RadFluitContentControl.LargeContent> next to the toggle button.

    On Click i want to open a database mask for this node. How do i get the selected node in my Click-Event?

    Thanks
    Best Regards
    rene
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 11 Sep 2013 Link to this post

    Hello ITA,

    If the selected node is the one whoose button you have clicked simply use the DataContext of the Button.
    It should be the same as the DataContext of the Shape holding the Button. Is this what you need ? If for some reasone these DataContexts are different, you can access the Shape via the following code:

    (sender  as RadButton).ParentofType<RadDiagramShape>()
    ParentOfType is extension method from Telerik.Windows.Control but we highly suggest you to avoid it if there is a possible way.

    Regards,
    Petar Mladenov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top