Support for the Demo Controls

4 posts, 0 answers
  1. Rama
    Rama avatar
    8 posts
    Member since:
    Sep 2012

    Posted 10 Jan 2013 Link to this post

    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


  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 14 Jan 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. ADO
    ADO avatar
    1 posts
    Member since:
    Mar 2011

    Posted 06 Feb 2013 Link to this post

    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
  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 11 Feb 2013 Link to this post

    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.

Back to Top