tabcontrol

Expanding and collapsing in WPF

Hi, I want to create control like one in PDF file.In PDF,in left side pane we can see tabs like bookmark,signature etc., as image and we can expand it and collpase it.I want exactly like tht. As im new to WPF,i referred some samples and i created tabcontrol. Till now i achieved tabcontrols with image as Tab header. But i don know how t...

Problem with TabControl alignment in VB.NET

Hi there, I'm having a weird behaviour with a left-aligned TabControl in VB.NET. Screenshot: What I wanted was to have the tabs literally the same way they would be if rotated 90 degrees to the left. Does it have something to do with the fact I'm not (god forbid) using the standard XP theme? Any solution to just make it work? (Even...

WPF search windows - like tabPages in tab control

Hello, I have idea to implement my wpf windows like TabPages in tab control. It is possible to do that dinamically in c# code. In Example i have Menu in main window. Some Menu items calls search type windows. Is it possible to do such a thing in C# code (SomeMenuItem_Click): this code adds new tab in tabControl of main window. If there a...

Disable default shortcuts on a TabControl

Ctrl + PageUp/PageDown and Ctrl + Tab are default shortcuts for the TabControl. They help in moving between adjacent tabs. I would like Ctrl + PageX behaviour to work only for the Outer Tabs (tab1, tab2) and Ctrl + Tab behaviour for the Inner Tabs (tab3, tab4) when my focus is in the control (textbox here). For this I need to disable t...

How to add new user control in TabControl.ContentTemplate?

Hi i am little stuck with adding new instances of a usercontrol in TabControl.ContentTemplate? my Xaml is here </DataTemplate> </TabControl.ItemTemplate> <TabControl.ContentTemplate> <DataTemplate DataType="{x:Type uc:mytest1}"> <uc:mytest1> ...

TabControl.VerticalAlignment = Stretch doesn't do anything.

Hell, I am trying to make a TabControl to auto resize according to the its outer space(it's in a StackPanel): <Window x:Class="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="100"> <Grid> <StackPanel> <TabControl ...

Create TabItems with differing content at runtime based on templates in WPF

Hello, I'm writing an application with WPF and part of it involves managing for the user various files which are used configure custom, in-house devices. I need to be able to manipulate different types of configurations in tabs in the same TabControl, meaning that the content of the TabItems must be dynamically generated. I'd like to d...

Drop outside the control

I'm improving standart WPF TabControl. I want to add undocking functionality to it: user drags the page just outside the TabControl and this page undocks in the window. I want two events in this control - PageDragStart (raises when the page dragged outside) and PageDragEnd (raises when the page dropped outside) I've got no problem with ...

WPF TabControl Switch behaviour

Hi, I have a tabcontrol which binds to an observable collection of tabs. The tabcontrol always has the first tab which hosts a listview bound to another observable collection. On selecting an item in that list view a new tab is created an focus given to it. The problem I am having is: When I switch back to the first tab there is a...

WPF application crash...

I am working on a WPF application with a TabControl (3 tabs with textBlocks, labels and dataGrids). The application auto-refreshes the data on these tabs using background threads. Everything works great except for the fact that if I switch tabs when one of the background processes fires, it throws an "Object reference not set to the in...

TabControl in ComboBox

I would like to create an ImagePicker control that lets users pick an image from a variety of sources. A picture is worth a thousand words: I'm not yet cool enough to post images <ComboBox> <local:GoogleImage/> <local:GoogleImage/> <local:GoogleImage/> <local:BingImage/> <local:BingImage/> </ComboBox> Basically, I...

C# Winforms Panel with same style (shadow) as TabControl?

I want a panel to have some sort of dropshadow like the TabControl has, is this possible? ...

Lost title on tabs of tabcontrol

It looks like i've lost the title on the tabpage of my tabcontrol ? If I change the text in the properties I can see that the width of the tab has grown/is slimming But I see no text. And how to change the gray color on the edges of my tabcontrol ? ...

Fetch controls in a tabcontrol

Howto reach the controls in a tabcontrol, I want to color all the textboxen into a color with a simple foreach method: foreach (Control c in this.Controls) { //btw I get the next error at this line: System.Windows.Forms.TabControl' is a 'type', which is not valid in the given context if (c == System...

Vertical Text on Right-Aligned TabControl

Trying to have the text on each tab of the tabcontrol to be displayed vertically. Being that I've never forayed into controls and what not, i'm sorta stuck. Found some code to get the text to display as if it were rotated to the left. I would like it to display as if it were rotated right (vertically) on the tab. The skeleton code is ...

Render a content control in another tab of TabControl

I have a program wherein there are multiple tabs added dynamically to a TabControl object programmatically. What I want to do is render the Content value of each of these tabs to a PNG. I am using a script I picked up elsewhere on StackOverflow or perhaps Google (lost the source). My code looks like this: if (tabPanel.Items.Count > 0) {...

WPF TabItem Style with image

I have a TabControl with TabItems, The Tab Items have text and an icon. To do this I have to add a StackPanel to the TabItem. However, once I add the StackPanel I can no longer control the default style of the text. Resource: <Style TargetType="{x:Type TabItem}"> <Setter Property="Template"> <Setter.Value> <Con...

WPF TabControl - how to preserve control state within tab items (MVVM pattern)

I am a newcomer to WPF, attempting to build a project that follows the recommendations of Josh Smith's excellent article describing The Model-View-ViewModel Design Pattern. Using Josh's sample code as a base, I have created a simple application that contains a number of "workspaces", each represented by a tab in a TabControl. In my appl...

WPF UI persistence in TabControl

I am having issues with something that seems like it should be very simple but in fact has proven quite difficult. Lets say you have a TabControl bound to an itemsource of ViewModels and the items displayed using a DataTemplate. Now lets say the DataTemplate consists of a Grid with two columns and a Grid splitter to resize the columns. ...

Deny Switching to Tabpage in a tabcontrol

I have a form(C#) with a tab control and its has around five tab pages. each of the tab have a few textboxes. 1) if a User is in say Tab A and edits certain fields i need to validate the text enetered if found invalid then i should not allow any tab switch ? is that possible? 2) Another case could be ... user edits some values and ...