Questions tagged [tabcontrol]

A tab control is a control in graphical user interface which contains multiple tab items that share the same space on the screen.

A tab control is useful for minimizing screen space usage while allowing an application to expose a large amount of data. It enables a developer to arrange visual content in a compacted and organized form.

References:

2206 questions
170
votes
22 answers

How to hide TabPage from TabControl

How to hide TabPage from TabControl in WinForms 2.0?
Tom Smykowski
  • 25,487
  • 54
  • 159
  • 236
111
votes
10 answers

Is there Selected Tab Changed Event in the standard WPF Tab Control

In WPF, is there an event that can be used to determine when a TabControl's selected tab changes? I have tried using TabControl.SelectionChanged but it is getting fired many times when a child's selection within a tab is changed.
Jon Kragh
  • 4,529
  • 5
  • 26
  • 26
100
votes
27 answers

How can I disable a tab inside a TabControl?

Is there a way to disable a tab in a TabControl?
Gold
  • 60,526
  • 100
  • 215
  • 315
96
votes
4 answers

How to use DockStyle.Fill for standard controls in WPF?

I'm used from windows forms, that I create a panel, place controls inside it and give them DockStyle.Fill to max out their size to the surrounding panel. In WPF I want to have the same. I have a TabControl and I want its size to fill as much of the…
citronas
  • 19,035
  • 27
  • 96
  • 164
87
votes
9 answers

`vsync` property in TabController constructor

According to this: sample code I created my own implementation of TabController: void main() { runApp(new MyApp()); } class MyApp extends StatefulWidget { @override _MyAppState createState() => new _MyAppState(); } class _MyAppState extends…
Kamil Harasimowicz
  • 4,684
  • 5
  • 32
  • 58
87
votes
5 answers

Activate TabPage of TabControl

I am using TabControl in a .NET application. By default, the first tab page of TabControl is showing in form loading. I want to show other tab pages in form loading. Programmatically, how can I show a different tab page?
Vyasdev Meledath
  • 8,926
  • 20
  • 48
  • 68
82
votes
7 answers

How to create trapezoid tabs in WPF tab control

How to create trapezoid tabs in WPF tab control? I'd like to create non rectangular tabs that look like tabs in Google Chrome or like tabs in code editor of VS 2008. Can it be done with WPF styles or it must be drawn in code? Is there any example of…
zendar
  • 13,384
  • 14
  • 59
  • 75
77
votes
4 answers

How do I bind a TabControl to a collection of ViewModels?

Basically I have in my MainViewModel.cs: ObservableCollection MyTabs { get; private set; } However, I need to somehow be able to not only create the tabs, but have the tabs content be loaded and linked to their appropriate viewmodels while…
michael
  • 14,844
  • 28
  • 89
  • 177
68
votes
6 answers

Check if a specific tab page is selected (active)

I am making an event to check if specific tab page in a tab control is active. The point is, it will trigger an event if that tab page in a tab control is the currently selected tab. Any code that will give me what I need?
Naufal Fikri
  • 1,091
  • 3
  • 11
  • 14
62
votes
4 answers

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…
Anders
  • 1,401
  • 3
  • 16
  • 20
56
votes
11 answers

How to get current tab index in Flutter

In flutter implementing a tab layout is easy and straightforward. This is a simple example from the official documentation: import 'package:flutter/material.dart'; void main() { runApp(new TabBarDemo()); } class TabBarDemo extends…
Toni Joe
  • 7,715
  • 12
  • 50
  • 69
54
votes
3 answers

How to build vertical tab sets in WPF?

How to build vertical tab sets in WPF? The tabs will stack up in top-to-bottom just like the "Properties" of a project shown in visual studio.
Gulshan
  • 3,611
  • 5
  • 35
  • 46
54
votes
8 answers

TabControl with Add New Tab Button (+)

What is the proper way of adding a '+' button tab at the end of all the tab items in the tab strip of a tab control in WPF? It should work correctly with multiple tab header rows. It should be at the end of all tab items Tab cycling should work…
NVM
  • 5,442
  • 4
  • 41
  • 61
53
votes
9 answers

How to programmatically select a TabItem in WPF TabControl

I would like to know how to select a specific TabItem in a WPF TabControl. I tried these bellow but nothing work! MyTabControl.SelectedIndex = x MyTabControl.SelectedItem = MyTabItem MyTabControl.SelectedValue = MyTabItem MyTabItem.IsSelected =…
Pierre Toutant
  • 531
  • 1
  • 4
  • 3
53
votes
10 answers

Hide Tab Header on C# TabControl

I am developing a Windows Form Application with several pages. I am using a TabControl to implement this. Instead of using the header to switch between tabs, I want my application to control this e.g. the next tab should open after the user has…
Hossein Mobasher
  • 4,382
  • 5
  • 46
  • 73
1
2 3
99 100