tabcontrol

How can I detect when a control is no longer visible?

In my current app I have a Tree control on a page of a TabControl which is inside a panel of a SplitContainer control. The tree control can thus be hidden by either hiding the SplitContainer panel, or switching to another TabPage in the TabControl. In the Form's menus there are commands which act on the currently selected Node in the tr...

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

Hi, I'm very new to 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 the same. I have a tab-Control and I want its size to fill as much of the form as possible. I have a ribbon control (RibbonControlsLibrary) an...

How to combine the RibbonControlLibrary Ribbon event mechanism to work with a TabControl?

Hi there. I'm using the Microsofts RibbonControlLibrary for a Ribbonmenu with several RibbonCommands. I have a TabControl that should contain tabs for each ribbon button pressed. E.g. I click on RibbonCommand 2, I want a tab called "Tab2" be created, if it is not already present in the TabControl, otherwise it should be focused. I've al...

WPF: trigger to check if TabControl has only 1 tab!

Is there any trigger I can create to see if a Tabcontrol has only one TabItem. In these cases I actually have a TabItem collection in the codebehind wich I could possibly use a count method on. In the case of only one tab I wan't to hide the TabPanel. Can I just call visibility=collapse on it? ...

How to show XAML inside a Tab Control in Silverlight 4

Basically what I am asking here is how to display a XAML page within a tab control that is part of another XAML page. Or, for that matter, if this is even possible. I want to be able to click a button on page1 and be able to view the page2 from within a tab control that is on page1. Would this be something to be handled within a Fra...

Implementing MVC/MVP Design for TabControl ..design question

Hi All, I have a an Winform application with 2 forms. In one form I have a Tab Control with 3 Tabs and navigation buttons to switch between tabs. On the first tab the user selects a file and on navigating to next tab i want to do some processing on the file selected in the first tab,and show the result in the 3rd tab. The other form j...

Iterate textboxes in order by name, inside a tab control

I have a bunch of textboxes, about 150 to be exact. They are inside different tabs of a tab control, and are not in order by name on screen. They are named simply textBox1, textBox2, textBox3... I would like to be able to iterate them in order by name and not by how they appear on the form. How would I got about doing this? ...

How to auto size a form around a tab control + more controls

Dear reader, I have a form that has several controls: ProgressBar at the top of the form (docked) A TabControl at the top of the form (also docked but underneath the progress bar) Buttons, TextBoxes and labels inside TabPages of the TabControl FlowLayoutPanel at the bottom of the screen (docked) with a few buttons in it Label at the...

WPF: Changing the layout of Tabs in TabPanel

Instead of at the top I wan't my tabs on the left side. I changed the template for the the TabControl so that the TabPanel would appear in first column and the second column would host the content. Problem is I'm not sure how I change the TabPanel's layout so the tabs appear stacked vertically. I know in normal ItemsControl objects its...

TabControl Styling in WPF

I have a collection of objects which contains a child collection. I can get the parent collection to show properly on the tabs. But I cannot get the child collection to show in the content pane. here is my XAML: <d:DataContext> <Binding Source="{StaticResource SearchResultsViewModel}" /> </d:DataContext> <TabControl TabSt...

Building a dynamic TabControl in Silverlight

I would like to build a TabControl in Silverlight which is driven by a collection of objects. I'll show the code below of a VERY basic setup that I'm trying to prototype. MainPage.xaml <UserControl x:Class="DataDrivenTabControl.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.micros...

WPF Routed Command with Bindings per-Tab

I intended to disable and enable the Buttons outside the TabControl, just like those inside the TabItem when the current tab is changed. But the CommandBindings of the TabItem do not seem to impact "up" the visual tree. What is the right way to do this? With this XAML: <Window x:Class="WpfApplication10.MainWindow" xmlns="http://sch...

What is the proper way to handle multiple datagrids in a tab control so that cells leave edit mode when the tabs are changed?

In wpf I setup a tab control that binds to a collection of objects each object has a data template with a data grid presenting the data. If I select a particular cell and put it into edit mode, leaving the grid by going to another tab this will cause the exception below to be thrown on returning the datagrid: 'DeferRefresh' is not allo...

Hiding and Showing TabPages in tabControl

Hi, I am trying to show or hide tabpages as per user choice. If user selects gender male then form for male in a tabpage "male" should be displayed and if user selects female then similar next form should be displayed in next tab "female" I tried using tabControl1.TabPages.Remove(...) and tabControl1.TabPages.Add(...) It adds an...

WPF Tab Control + Animations

I'm trying to style/animate a TabControl such that when a tab is selected, the old one fades out, and the new one fades/slides in. I have the tab control styled, to a point, but now I'm trying to work out how to animate the panel. Blend doesn't seem to be much help: there are references to styling "target-element", and references to "P...

C# Storing original positions of Tab Pages within a Tab Control

Hello, I'm relatively new to C# and I'm trying to use a tab control which has 5 tab pages within it. These tab pages are displayed and hidden when required and I am able to re-add pages to the required position e.g. tabPage 2 should be re-added between tabPage1 and tabPage3 by passing in a number relating to the position I want it to a...

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...

Validation Summary in TabControl (Silverlight 4)

Hello, everyone. Here is my question. I'm using MVVM pattern in my project and i have a UserControl, which has a TabControl on it. TabItems have validations on them. Main page looks like this: <UserControl> <DataInput:ValidationSummary x:Name="ValidationSummary"/> <Grid x:Name="LayoutRoot"> <DataInput:ValidationSummary ...

WPF TabControl collapsed tab headers are not completely hidden

I am using a TabControl to programmatically show or hide groups of form controls. I have implemented the technique described here and it approximately works as expected, except that there is a band approximately 1 or 2 pixels high in the location where the tab headers are normally displayed. I have verified this by using Snoop to naviga...

How to implement a tab control where each tab is a generic paged entity?

Background: I'm trying to implement a tab control. The tabs are as follows: | Funds | Companies | Groups | and are implemented as follows: <ul class="ActionControl"> <li> <%=Html.ActionLink(string.Format("Funds ({0})", Model.Summary.FundCount) , "ResultsList", new {selectedTab = "Funds"} ) %> </li> //...