tabcontrol

WPF Styles for TabControl / TabPanel / TabItem

岁酱吖の 提交于 2019-12-03 07:02:20
Here's a newbie question on the WPF TabControl, TabItem and TabPanel. There is a related question on StackOVF with an answer I happily used in my app. Here's a link to the answer, and the code snippet as well: WPF: Center TabItems in a TabControl <TabControl> <TabControl.Resources> <Style TargetType="{x:Type TabPanel}"> <Setter Property="HorizontalAlignment" Value="Center" /> </Style> </TabControl.Resources> <TabItem Header="Test 1" /> <TabItem Header="Test 2" /> <TabItem Header="Test 3" /> <TabItem Header="Test 4" /> </TabControl> While this is wonderful, I'd love to move the Resources and

How to change the DXTabControl Background Color?

血红的双手。 提交于 2019-12-02 19:04:28
问题 I have a DXTabControl and I want to change the Background Color of the DXTabControl . How can I do that? <dx:DXTabControl> <dx:DXTabItem Header="System" Margin="0"> <dxe:TextEdit x:Name="txtChargeNo" Background="#D5D6D8" ShowNullText="True" NullText="Sarj No" Height="30" FontSize="16"/> </dx:DXTabItem> <dx:DXTabItem x:Name="tbPast" Header="Past"> </dx:DXTabItem> </dx:DXTabControl> 回答1: Did you try setting the BackgroundColor property of the DXTabItem ?: <dx:DXTabItem Header="System" Margin="0

Google visualization is small inside AJAX Control Toolkit Tab Control

心已入冬 提交于 2019-12-02 18:24:30
问题 I'm trying to use a google visualisation, the column chart, inside an asp.net AJAX Toolkit Tab Control, but I'm having small (literally) problems. If I add the visualisation to the tab that's displayed by default when the page loads, the bar chart displays correctly, however, if I add the same control to another tab and reload the page, when I click on the other tab, the control is displayed, but its tiny and unusable . Here's some code for a test.aspx page that illustrates the problem: <%@

How to put WPF Tab Control tabs on the side

风格不统一 提交于 2019-12-02 17:30:19
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. The effect I believe you are seeking is achieved by providing a HeaderTemplate for the TabItem's in you Tab collection. <TabControl TabStripPlacement="Right"> <TabControl.Resources> <Style TargetType="{x:Type TabItem}"> <Setter

How to remove dotted focus rectangle from tab control? [closed]

六眼飞鱼酱① 提交于 2019-12-02 13:04:58
I'm trying to remove dotted focus rectangle from my custom Tab Control . I've tried everything and I could not remove that rectangle. As you can see in the picture, the focus rectangle is disturbing in my application design. Please help! To remove the focus cue, you have to set UserPaint to true, and then paint the entire tab control yourself, including the borders, text, backgrounds, highlighting, hot-tracking, etc. The following code only paints the tab text and the background: public class TC2 : TabControl { public TC2() { this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles

How to kept a graphic drawing in a picturebox on a tab control after switching to tab 2 and return to tab 1?

感情迁移 提交于 2019-12-02 12:54:41
问题 I have a Tab Control with two (2) Tabs. The Tab 1 does a drawing in a picture box (the picture box is optional, I can draw directly to the tab) using Graphics Addline. The second tab opens a web browser. Everything is working fine. I can make the drawing in the first tab but when I switch to the second tab and return to the first tab, the drawing disappear and if I return to tab 2 I can see what I was watching in the web browser. I need to kept the drawing in the tab 1 so when I return to it

Cloning tabs in Tab Control on button click in Winforms

﹥>﹥吖頭↗ 提交于 2019-12-02 12:35:24
问题 so I have a Homepage on one of the TabPages on winform TabControl. I have a button, that adds a new tab using this Tabs.TabPages.Add("Homepage"); But TabPages.Add() just adds a new blank page, how would i clone my HomePage on the new tab? For instance, if my homepage has a button "Click me", when i open a new tab, I want it to have the same button "Click me" linked to the same event "ClickMe_click". Like a Chrome Tab control. I couldn't find any event or method built in for TabControl on msdn

Google visualization is small inside AJAX Control Toolkit Tab Control

纵饮孤独 提交于 2019-12-02 08:51:42
I'm trying to use a google visualisation, the column chart, inside an asp.net AJAX Toolkit Tab Control, but I'm having small (literally) problems. If I add the visualisation to the tab that's displayed by default when the page loads, the bar chart displays correctly, however, if I add the same control to another tab and reload the page, when I click on the other tab, the control is displayed, but its tiny and unusable . Here's some code for a test.aspx page that illustrates the problem: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="TestProject._Default"

Set the tab item text as bold in WPF tab control

风流意气都作罢 提交于 2019-12-02 07:48:11
问题 When I set my tab item font weight to bold, all the controls within that tab become bold. How do I set just the text header of the tab item without affecting the controls? 回答1: This is what I did to get it to work. Thanks, SeeSharp, for the hint. <TabControl.Resources> <Style TargetType="{x:Type TabItem}"> <Setter Property="HeaderTemplate"> <Setter.Value> <DataTemplate> <TextBlock FontWeight="Bold" Text="{Binding}"/> </DataTemplate> </Setter.Value> </Setter> </Style> </TabControl.Resources>

Set the tab item text as bold in WPF tab control

南笙酒味 提交于 2019-12-02 07:15:52
When I set my tab item font weight to bold, all the controls within that tab become bold. How do I set just the text header of the tab item without affecting the controls? This is what I did to get it to work. Thanks, SeeSharp, for the hint. <TabControl.Resources> <Style TargetType="{x:Type TabItem}"> <Setter Property="HeaderTemplate"> <Setter.Value> <DataTemplate> <TextBlock FontWeight="Bold" Text="{Binding}"/> </DataTemplate> </Setter.Value> </Setter> </Style> </TabControl.Resources> Use ItemTemplate to set template for tab header. Example: <TabControl ItemsSource="{Binding Items}">