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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can not create TreeViewItems from CodeBehind

Thread ID:





98066 Jan 31,2011 02:49 PM UTC Feb 21,2011 12:19 PM UTC WPF 1
Tags: Tools
Administrator [Syncfusion]
Asked On January 31, 2011 02:49 PM UTC

Hi there,

I've tried to create TreeViewItems from CodeBehind. The TreeView is defined in my Xaml without any Items.

This is what I've tried:

private void CreateTree()
Global anlegen
TreeViewItemAdv globalItem = new TreeViewItemAdv()
Header = "Global",
Tag = "global",
IsExpanded = true
TreeViewItemAdv paraZuordnenItem = new TreeViewItemAdv()
Header = "Parametergruppen zuordnen",
Tag = "parametergruppen zuordnen"
TreeViewItemAdv paraDefItem = new TreeViewItemAdv()
Header = "Parameter definieren",
Tag = "parameter definieren"


The method is called after InitialisingComponent and runs through without any Errors. But after all I get this message:

The object reference was not specified on an object instance.

What am I doing wrong?

Deenadhayalan M [Syncfusion]
Replied On February 21, 2011 12:19 PM UTC

Hi Andreas,

Thanks for using our Syncfusion products.

We create a sample with TreeViewAdv as you told. And we are not able to reproduce the issue from our side. We have attached the sample for reference. Please provide us some more information to reproduce the issue so that we can provide the solution at earliest.

Deenadhayalan M



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon