Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > TabControl > Tab headers close button image and content

Not answered Tab headers close button image and content

Feed from this thread
  • Mario avatar

    Posted on Jan 25, 2012 (permalink)

    I have tested the sample "How to Add Close Button to the Tab Headers" and all is ok but i have 2 questions:
    1) how can i change the image of the header
    2) how can i call to a Page from the tabitems added. I've tried with:

    ...
                TabItemModel x = new TabItemModel();
                x.Title = "TITLE";
                x.Content = new Page1();
                tabItemsModel.Add(x);
    ...

        public class TabItemModel
        {
            public String Title
            {
                get;
                set;
            }
            public Object Content
            {
                get;
                set;
            }
        }

    no success

    Reply

  • Mario avatar

    Posted on Jan 25, 2012 (permalink)

    Ok, It goes on with:

                <Setter Property="ContentTemplate">
                    <Setter.Value>
                        <DataTemplate>
                                <ContentControl Content="{Binding Content, Mode=TwoWay}" />
                        </DataTemplate>
                    </Setter.Value>
                </Setter>

    But now the problems are:

    - The the Page don't full the tabitem. How can I make  the content width=auto and height=auto
    - When I select 2 times the same tabitem i got the message : The element is already the child of another element 
     

    Reply

  • Mario avatar

    Posted on Jan 25, 2012 (permalink)

    <ContentControl VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" Content="{Binding Content, Mode=TwoWay}" />

    ONLY ONE PROBLEM:

    - When I select 2 times the same tabitem i got the message : "The element is already the child of another element"  
    Is this a bug?

    Thanks

    Reply

  • Mario avatar

    Posted on Jan 25, 2012 (permalink)

    That's all: ContentPresenter 

    Thanks to everybody for the help

    :)

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > TabControl > Tab headers close button image and content
Related resources for "Tab headers close button image and content"

Silverlight TabControl Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]