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

Support for the Demo Controls

3 Answers 213 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Rama
Top achievements
Rank 1
Rama asked on 10 Jan 2013, 08:56 AM
Hi,

1. I installed wpf demo controls on machine and i am working with them. but how can i access solution files for those controls.?

Why i am asking is the code you provided in the demo installer missing some stuff.

I am trying to see how treeview control works in WPF but it is missing some important file.

Goto FirstLook of RadTreeView Control 
   Select Code
       Select Examle.xaml
         at the bottom of the file there is code like 
  <project:ContentControlEx Grid.Column="2"
    TemplateSelector="{StaticResource DetailsTemplateSelector}"
    DataContext="{Binding Path=SelectedItem, ElementName=xTreeView}" Content="{Binding}" />

but i dont see any ContentControlEx in the code files

Please provide those files or where can i find demo solution projects

Thanks
Rama


3 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 14 Jan 2013, 04:50 PM
Hello Rama,

Under your telerik account you can find the Download link to our Demos application, that has all the source code of our demos including the RadTreeView demos.
You can also find all the information you need about the controls in our help documentation. You can read the articles for the RadTreeView Control which can be found here.

You can also find the How To section of almost each control where are placed and described step-by-step the solutions of some frequently met issues. Also, you can download the compiled code snippets of some articles which are available in our code library section.

Kind regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
ADO
Top achievements
Rank 1
answered on 07 Feb 2013, 05:31 AM
Hello,

You said:
"Under your telerik account you can find the Download link to our Demos application, that has all the source code of our demos including the RadTreeView demos."

Rama, like me, has found the ContentControlEx class In the Example.xaml of the RadTreeView demo you mentioned.
<project:ContentControlEx Grid.Column="2"
    TemplateSelector="{StaticResource DetailsTemplateSelector}"
    DataContext="{Binding Path=SelectedItem, ElementName=xTreeView}" Content="{Binding}" />

But the code for this class (ContentControlEx) is missing. 
Can you provide it here. Or tell us in wich other demo it is described.

Thank you
0
Pavel R. Pavlov
Telerik team
answered on 11 Feb 2013, 05:50 PM
Hi,

If you log into your account you will be able to go in the Manage Products section and you can choose Trial downloads. There you will see the RadControls for WPF trial activated and you will be able to Download the source code of the demos. For your convenience I extracted the code:

public class ContentControlEx : ContentControl
{
    public DataTemplateSelector TemplateSelector
    {
        get { return (DataTemplateSelector)GetValue(TemplateSelectorProperty); }
        set { SetValue(TemplateSelectorProperty, value); }
    }
 
    public static readonly DependencyProperty TemplateSelectorProperty =
        DependencyProperty.Register("TemplateSelector", typeof(DataTemplateSelector), typeof(ContentControlEx), new PropertyMetadata(null));
 
    protected override void OnContentChanged(object oldContent, object newContent)
    {
        base.OnContentChanged(oldContent, newContent);
        if (this.TemplateSelector != null)
        {
            this.ContentTemplate = this.TemplateSelector.SelectTemplate(newContent, this);
        }
    }
}


Kind regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TreeView
Asked by
Rama
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
ADO
Top achievements
Rank 1
Share this question
or