tabitem

How to make only the header of the tabitem respond to the mouse event

I'm trying to make only the header of the TabItem send an event. So far I have my xaml... <TabControl> <TabItem Header="tab 1"> Any text </TabItem> <TabItem Header="tab 2"> <TextBox>blah</TextBox> </TabItem> <TabControl.Resources> <Style TargetType="Ta...

Getting a black frame inside the iframe while clicking a tab item in Facebook iFrame application.

Hi, I am developing a Facebook iFrame application for an existing site. I load the web page using the <iframe> code. I also have a tab section, with tab-items Home, InviteFriends etc. But there is a lot of empty space between the tabs and the loaded web page. This is my index.php file <?php require_once 'appinclude.php'; $user_id...

How can I set different fonts for tabitem header and content of this tabitem??

Hello! How can I set different fonts for tabitem header and content of this tabitem?? ...

How to remove the default margin on the content of a TabItem?

I'm using the TabControl class in WPF and I've noticed that the content of each TabItem has a default margin of 4 pixels on all sides. Sample code: <Window x:Class="TabControlPadding.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Windo...

How to use left over space in wpf tab items row

Upper part of TabControl consists of TabItem controls. Is there a way to reuse remaining space there to put some WPF content? I think I could use a "fake" TabItem with different styling and put my stuff in TabItem.Header but I was hoping there's a better way. Solution Based on the answer below, I got the desired behavior by wrapping T...

Preventing the User to select a tab WPF Tab Item

I had to prevent the user from selecting a tabitem in a WPF TabControl, 1)unless and untill the user checks a check box in one condition the user should be shown a message box and if he checks the check box he can navigate to any other tab 2)Checking a particular condition the user shouldnt be able to get into a particular tab on selec...

In C# WPF, why is my TabControl's SelectionChanged event firing too often?

I have a tabbed GUI with each tab containing a Frame. In one of these Frames there is a DataGrid. When the user selects this tab, I need my datagrid sorted, so I'm using the TabControl SelectionChanged event to trigger the sort. However, this event triggers every time an item is selected from the DataGrid, even though the tabs themselves...

SWT: Multiline Table header / Multiline TabItem text

I migrate application from Swing to SWT and cannot find out how to make table headers in SWT multiline and also TabItems to have multiline text. In Swing it was not problem but in SWT no way. For table header i found that on linux it is working but i need it for windows. I tried \n and <br> but nothing. ...

WPF: Setting Foreground of a Label inside a TabItem Header using styles

Hello, I have a TabControl which looks like this: <TabControl> <TabItem> <TabItem.Header> <StackPanel Orientation="Horizontal"> <Canvas ... /> <Label>Tab Number 1</Label> </StackPanel> </TabItem.Header> </TabItem> <TabItem> <TabItem.Header> <StackPanel Orientation="Horizontal"> ...

select tab item on hover while in drag-and-drop operation in SWT

I need to select tab items from a SWT tab folder while in a drag-and-drop operation on hover, just like windows does with task bar buttons. My solution can be platform dependent (Windows). Unfortunately mouse track events do not fire while in DND operations. I decided to implement myself the hover event. I get some mouse events with the...

Display Dynamic Number in WPF TabItem Header

I have a TabControl where every item contains a User Control called Timeline. This "Timeline" has a property called "Number" which changes during runtime. I want to make the property "Number" to be displayed in the TabItem header. And i have really no idea how to do that to be honest. My first thought is that i have to create a Custom ...

Silverlight: Adding TabItems to TabControl dynamically with a standard ContentTemplate for all tabs

I would like to add TabItems to a TabControl dynamically with a standard ContentTemplate comprising of a grid and few other input controls like textbox and button. Can someone pls help me achieve this? Also, if I try to load data from a WCF service asynchronously to the grid, there will definitely be a time lag. So how do I exactly bind...

How to change the order of the TabItem in the wpf TabControl

I need to change the order of the TabItem. I've tried with Remove / Insert and it doesn't works. void UserControl_Loaded(object sender, RoutedEventArgs e) { if(condition) { TabControl.Items.Remove(TabItem); TabControl.Items.Insert(0, TabItem); } } InvalidOperationException: Element already has a logical parent. It mus...

How to access new visual tree when WPF TabControl SelectedItem changes

Considering an already loaded and rendered TabControl with three tabs, with selected tab being index 1 (the middle one): Tab 1: Has one TextBox Tab 2: Has two TextBoxes Tab 3: Has three TextBoxes If I iterate through the selectedItem's visual tree with VisualTreeHelper, I will get Two textBoxes within the TabControl's children. I wa...