tabcontrol

How to hide a tab (not just disable it) in .NET CF

When a particular tab on a TabControl is selected, I currently disable all other tabs using TabControl.Enabled = false. I would also like to hide them to avoid confusing users. Is there any way of doing this without removing the tabs and then adding them back in? ...

adding a control to tabs generated dynamically in tabcontrol in C# .net

Hi everyone, i am new to C# .net. Can some one help me out with the below prblm: I have a tabcontrol in my windows form application, where the tab pages are generated dynamically. the content to be displayed on each tab wud be fetched from my database. i need some kind of control(which can display the fetched data) that i can add on eac...

Silverlight 3 - Dynamic TabItems in TabControl

I've got an ObservableCollection of POCOs (Plain old CLR Objects) that I want to represent in a tabbed idiom. Prefereably using the MVVM pattern, is there a way to bind the collection of TabItems to the count of my POCO collection? So, in this case if there are 3 items in my collection, I'd like to see 3 TabItems. Each TabItem would c...

WPF vertical TabItem border issue

I'm just starting with WPF and I'm facing a visual issue after displaying TabControl on the Left and Rotating TabItem text header 90 degrees. The issue is that the top border of the TabItem header is not showing. The code is this: <Window x:Class="WPF_Exemplo1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentatio...

WPF TabItem Content alignment is always centered

I'm trying to put some content inside my TabItem, but I can't add a container that fills the space of the TabItem. Anything that I add shows up centered. I'm using a Theme from WPF Toolkit (WhistlerBlue.xaml), so I think that maybe it's that what is causing me this issue. I cannot remove the Theme, because I need it. At most I could ch...

WPF - Why is my buttons content moving separately from the button itself?

I have created a TabControl in a WPF application I'm writing. I re-templated TabItem so that I could have a button on each tab header to close it. So far, all is well and good. I decided that I now wanted shiny round buttons instead of the default square ugly things. Also, I wanted to use an image as my buttons content instead of simply...

Let WPF Tabcontrol height assume height of largest item?

Is there any way to have to tabcontrol take the size of the largest tab item (well, actually, the tabitem's content)? Since the tabcontrol has no specific size assigned it should autosize: it does that correctly, but when you switch tabs it automatically resizes itself to the height (and width) of the contents of the currently selected ...

How to change selected tab on Button click in WPF TabControl with Buttons in Header

I have a WPF TabControl that has a couple of buttons in the TabItem header. I want the selected tab to change when a headered button is clicked. Here is a code snippet: <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt; <Grid> <TabControl> ...

Tab Control in VB.Net

Hi all, I'm doing my project and I design including many tab control in vb.net. Example: I have 3 tab pages like tab1,tab2,tab3. And I have menu bar to open tab1,tab2,tab3. My Question is: How can you use code to open each tab page? Can anyone help me to solve this problem? Thanks, Sopolin ...

How to convert TabControl into wizard style in .NET?

I want to have my form in a wizard style and so I used TabControl to have the pages of the Wizard as my TabPages. There were small issues to be corrected, such as, making the tabs being displayed in runtime. I inherited the TabControl and I added a property called "TabsVisible" and corrected it. It worked fine. (See : http://dotnetrix.co...

WPF styling tabitem text foreground upon trigger such as IsEnabled, IsMouseOver, etc.

I'm trying to change the foreground text colour of a WPF tab item's header textblock using triggers. This works fine for most (simpler) scenarios but not when TextBlocks have been globally styled. So this simple "mouse over" trigger would work in terms of changing the foreground color: <Style x:Key="testTabItemStyle1" TargetType="{x:Ty...

Placing common contols in two tab pages.

I have a tab item with 2 tab pages. I want to place 4 check boxes in each of the tab pages with all check boxes having the same property. How it can be done easily? ...

How to access Button programatically if the button is inside using C#

Hi Guys, I have few questions as I am usign XAML for the first time. How do I use the button (BrowseButton) to browse a folder in Harddrive ? In this case as the button is inside Can I use the way I have shown below? Actually first dockpanel will hold the image and some label and the other dockpanel will have tabcontrol in it. If I ...

Create Tabbed MDI Interface

I am using C# 2005 to develop an Windows application. I am planning to use a Tab Container to display the child forms. I have used a Menu Strip to display the menu and have set IsMDIContainer = true property of the MainMenu form. The MainMenu form also contains a Tab Control and I plan to display all child forms as Tap Pages in the Tab C...

Make a user control resizable in a tab control.

I am unable to figure out how to make my user control react to the resize event of a form. The usercontrol(s) exist in a tab control of my main form. The usercontrol(s) are anchored to all sides of the tab control or is it tab page? The tab control is anchored to all sides of the form. When I resize my main form the tab control resizes c...

Remove a TabPage

I am using C# 2005 to create a Windows application. I have a MDIForm (frmMainMenu) which contains a Menustrip and a TabControl. My ChildForm is frmPurchaseEntry. When the user clicks on a particular Menu option a new TabPage is created and the child form is displayed within the TabPage. I am using the following code in the MenuClick...

C# WinForm; Passing group of controls to another class.

Hello, This is my scenario... I have a winForm tabControl that has a variety of fields on each tab (each tab has different fields). When the user clicks the 'Generate' button it is then supposed to pass controls from the tabControl's tab so that the called function can create an e-mail based off of the passed control's information. Each...

TabControl and set the focus on a textbox in WPF

I have a tabcontrol in WPF When I switch to a specific tabItem , I want to set the focus on a specific textBox I added the code of textBox_n.Focus(); in the event handler of selectionChanged, but it didn't work. I added the code in the event handler of the tabItem's GotFocus, but funny enough calling textBox_n.Focus(), was calling the ...

Why are tab headers displayed in the content area of tabs in a XAML TabControl?

I've got a TabControl whose ItemsSource is bound to an observable collection of views (UserControls) each which have as its root element a TabItem. However, when it is displayed, the Header text is in content of each TabItem, as if UserControl wrapper is causing conflicts: The TabControl is in SmartFormView.xaml: <UserControl x:Class...

Why is my TabItem custom control not showing up in the TabControl

I made a custom control called SmartTabItem, currently just the default implementation: using System.Windows; using System.Windows.Controls; namespace TestControl.Controls { public class SmartTabItem : TabItem { static SmartTabItem() { DefaultStyleKeyProperty.OverrideMetadata(typeof(SmartTabItem), ne...