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

add custom TabContent to shape

3 Answers 46 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
ITA
Top achievements
Rank 1
ITA asked on 16 May 2014, 07:34 AM
Hi,

i have to add different TabContents to different shapes? How to do that?

Thanks
Best Regards
Rene

3 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 20 May 2014, 04:14 PM
Hi Rene,

Can you tell me what you mean by "TabContents". Do you mean the SettingsPane? If so you can take a look at the Custom SettingsPane SDK example.

In general, if you want to implement different SettingsPane depending on the shape type you can define different styles for the panes. Then attach to the AdditionalContentActivated event of the RadDiagram and inside the event handler you can check the type of the selected items (e.ContextItems) and then set a style for the settings pane based on the shape type. The code in the handler will be something like the following:

private void diagram_AdditionalContentActivated(object sender, Telerik.Windows.Controls.Diagrams.AdditionalContentActivatedEventArgs e)
{
    if (e.ContextItems.Contains(item of type a))
    {
        this.settingsPane = this.Resources["settingsPanelStyl1"];
    }
    else
    {
        this.settingsPane = this.Resources["settingsPanelStyl2"];
    }
}

Regards,
Martin
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
ITA
Top achievements
Rank 1
answered on 22 May 2014, 06:15 PM
Hi,

thanks, this is it! But how do I save the properties in the xml-File?

Thanks
Rene
0
Accepted
Martin Ivanov
Telerik team
answered on 26 May 2014, 02:38 PM
Hi Rene,

As I can see you asked your question also in another forum where one of my colleagues answered it. You can see the reply in the following forum.

Regards,
Martin
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
ITA
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
ITA
Top achievements
Rank 1
Share this question
or