RadTabItem.ContentTemplateSelector

3 posts, 0 answers
  1. Shawn Shaddock
    Shawn Shaddock avatar
    25 posts
    Member since:
    Jun 2009

    Posted 28 Jul 2009 Link to this post

    I am trying to bind a collection of workspaces to the RadTabControl and use a DataTemplateSelector to choose the DataTemplate for the content based on which type of workspace is being rendered but the RadTabItem does not appear to use the DataTemplateSelector that I set. Here is an example of my code:

            <telerik:RadTabControl ItemsSource="{Binding Workspaces}"
                <telerik:RadTabControl.Resources> 
                    <Style TargetType="{x:Type telerik:RadTabItem}"
                        <Setter Property="ContentTemplateSelector"
                            <Setter.Value> 
                                <local:TabItemContentTemplateSelector /> 
                            </Setter.Value> 
                        </Setter> 
                    </Style> 
                </telerik:RadTabControl.Resources> 
            </telerik:RadTabControl> 

    I put a breakpoint in the SelectTemplate method but it never reaches it.

    Has anyone got this to work?
  2. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 03 Aug 2009 Link to this post

    Hello Shawn,

    This seems to be a bug from the RadTabControl. It does have a SelectedContent and SelectedContentTemplate properties but not SelectedContentTemplateSelector property, which is what is why it is not working in your case. We will be fixing this for a coming SP or internal build. I will follow up with a reply here once this has been fixed.

    Your Telerik Points have been updated for your feedback.

    Greetings,
    Miroslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 29 Aug 2009 Link to this post

    Hi Shawn,

    I just wanted to follow up on this issue

    Three properties has been added to the TabControl:  SelectedContentTemplateSelector, ContentTemplate and ContentTemplateSelector (for the items that do not have content set).

    The changes will be available with the Beta release of the controls, expected in september.

    Regards,
    Miroslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top