Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > TabControl > Image for RadTabItem header

Not answered Image for RadTabItem header

Feed from this thread
  • Srinivasa avatar

    Posted on Mar 3, 2009 (permalink)

    Hi, I am trying to make a proto type using WPF radcontrols. I need to set image/icon for tab raditem header.
    is thare any way?

    Thanks,
    Srini

    Reply

  • Bobi Bobi admin's avatar

    Posted on Mar 7, 2009 (permalink)

    Hello Srinivasa,

    If you want to have images, icons or other content in the RadTabItem header then you have to set the Header property:

    1. In a simple scenario with RadTabItem you can set the header as follows  :

    <telerik:RadTabControl>
            <telerik:RadTabItem >
                <telerik:RadTabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="/Examples/Common/Images/TabControl/Report/Financial.png"
                                Height="16" Width="16" />
                        <TextBlock Text="Financial Report" Margin="3,0,0,0" />
                    </StackPanel>
                </telerik:RadTabItem.Header>
            </telerik:RadTabItem>
    </telerik:RadTabControl>

    2.If you use more complex scenario with DataBinding:
    http://demos.telerik.com/silverlight/default.aspx#TabControl/HeaderContent

    I hope this answers your question.

    Best wishes,
    Boryana
    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.

    Reply

  • Srinivasa avatar

    Posted on Mar 7, 2009 (permalink)

    Thank you.

    Reply

  • Posted on Jan 30, 2012 (permalink)

    I am setting up the tab items in the code behind. How can I create tabs with images in the code behind?

    Thank you

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Feb 2, 2012 (permalink)

    Hello Kevin Marois,

     This could be something like so:

    RadTabControl tabControl = new RadTabControl();
    RadTabItem item = new RadTabItem();
    Image img = new BitmapImage(...
    TextBlock textBlock = new TextBlock(){Text = "Tab Header Text"};
    StackPanel stack = new StackPanel(){Orientation = Orientation.Horizontal};
    stack.Children.Add(textBlock);
    stack.Children.Add(img);
    item.Header = stack;
    tabControl.Items.Add(item);
    However, we highly suggest you to use XAML when its up to configuring your UI. 

    All the best,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > TabControl > Image for RadTabItem header
Related resources for "Image for RadTabItem header"

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