tabcontrol

Highlight or underline selected TabPageIndicator

半世苍凉 提交于 2019-12-21 03:48:37
问题 I have a dualpane on a tablet-sized landscape layout and I'm using fragments. On the left I have a fragment with a listview. When a click occurs on one of the item list the right fragment loads the detail. In the layout of the right (detail) fragment there is a com.viewpagerindicator.TabPageIndicator and a android.support.v4.view.ViewPager. The ViewPager will load 2 elements and each one has its com.viewpagerindicator.TabPageIndicator . I'm trying to highlight or underline the selected tab

WinForms Tab Control question

孤街醉人 提交于 2019-12-21 02:48:16
问题 I have a form that displays in two modes. Switching modes completely changes the appearance of the form much like you would expect if you were using a tab control and had a different layout of controls on each tab. A tab control would be perfect if I could hide the tab itself. Of course, I could use two panels and pro grammatically show and hide the appropriate panels. I tried this, but my anchoring keeps on getting messed up (I think it is a Visual Studio designer bug.) Ideally, I'd like to

WPF TabControl and DataTemplates

你离开我真会死。 提交于 2019-12-20 10:08:14
问题 I've got a set of ViewModels that I'm binding to the ItemsSource property of a TabControl. Let's call those ViewModels AViewModel, BViewModel, and CViewModel. Each one of those needs to have a different ItemTemplate (for the header; because they each need to show a different icon) and a different ContentTemplate (because they have very different interaction models). What I'd like is something like this: Defined in Resource.xaml files somewhere: <DataTemplate x:Key="ItemTemplate" DataType="{x

How to put WPF Tab Control tabs on the side

我的未来我决定 提交于 2019-12-20 08:57:15
问题 I am trying to create a Tab Control in WPF that has the tabs arranged down the right side of the control, with the text rotated 90 degrees The look is similar to those plastic tabs you can buy and use in a notebook. I have tried changing the TabStripPlacement to Right, but it just stacks the tabs up on the top right side of the control - not at all what I had in mind. 回答1: The effect I believe you are seeking is achieved by providing a HeaderTemplate for the TabItem's in you Tab collection.

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

跟風遠走 提交于 2019-12-20 07:59:01
问题 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 form as possible. I have a ribbon control (RibbonControlsLibrary) and want the rest of the form to be filled with the TabControl at max size. (I do not want to dock controls like docking in Visual Studio, just old docking mechanisms) 回答1: The WPF

WPF TabControl and DataGrid bugs, bugs and bugs

无人久伴 提交于 2019-12-20 06:35:17
问题 for everyone, I found different problems with WPF, the TabControl and the DataGrid. Especially if the TabControl ItemsSource is bound. Problems i found: Selection in DataGrid is not visible after switch Tabs back and forth DataGrid looses sorting on tab switch (SortDescriptions of CollectionView.GetDefaultCollection is cleared on unload) if a DataGrid cell has focus (is in edit mode) and you click on another tab, two things can happen: 1.) the bound object will not be updated; 2.) if the

How do I set TabControls TabItem header FontSize

折月煮酒 提交于 2019-12-20 05:23:08
问题 I have a TabControl with a style that changes the FontSize of the Header of the TabItem. When I data bind the ItemsSource only the headers are affected by the FontSize. But when I use the same style on another TabControl and add the TabItems in XAML the FontSize is changed on all content in the TabItem. I want the style to work with both databound and non-databound TabItems. <TabControl Style="{StaticResource VariablesTabControl}" ItemsSource="{Binding TabItems}"> ... </TabControl> MainSkin

Silverlight tabchanged event - tabcontrol

ぐ巨炮叔叔 提交于 2019-12-20 04:52:30
问题 I'm using tab control and I want to handle tabchanged event. I was trying to use SelectionChanged event with no luck. It's being fired too many times (after loading tabcontrol, or adding new tab). I would like to handle this event only when user navigates between tabs. I have found solution for WPF (Is there Selected Tab Changed Event in the standard WPF Tab Control) but it's no good for Silverlight. TIA. 回答1: Firing "too many times" should not be a problem if you check for an actual change

TabControl Context Menu

孤人 提交于 2019-12-19 06:29:11
问题 In a Windows Forms app I set the ContextMenuStrip property on a TabControl. How can I tell the user clicked a tab other then the one that is currently selected? How can I restrict the context menu from showing only when the top Tab portion with the label is clicked, and not elsewhere in the tab? 回答1: Don't bother setting the contextMenuStrip property on the TabControl. Rather do it this way. Hook up to the tabControl's MouseClick event, and then manually show the context menu. This will only

Make TabControl Headers Scrollable in WPF

不想你离开。 提交于 2019-12-18 17:23:14
问题 As Mentioned in Title, I want to change the header of my TabControl to be scrollable. The reason: I have too many tabItems, and the wrapping is not the best solution in my case. so I want to change it from : To something like that (Scroll bar indicated by the arrow) : Can anyone help me and show how to do that ? (I'm using wpf) 回答1: Changing TabControl.Template to something simple like this seems to work for me <TabControl ...> <TabControl.Template> <ControlTemplate TargetType="{x:Type