tabitem

How to make WPF TabItem Headers' Background transparent?

霸气de小男生 提交于 2019-12-24 14:28:37
问题 I have a TabControl with a few TabItems. Each TabItem has a Grid with a TextBlock and one Image, which has transparent areas, in it. My goal is to have the Text and the Image completely visible and see the Window.Background Image through the transparent areas. Problem: No matter what I tried, there is a white background behind the Image and TextBlock I have set. I tried to set the TabControl Opacity to 0, but that makes the whole thing dissapear, as expected. Same result with the TabItem

Accessing elements inside a DataTemplate in a TabItem

我怕爱的太早我们不能终老 提交于 2019-12-24 07:09:16
问题 Well , I have a problem with a function that I get from there [VB.NET] Public Class TreeHelper Public Shared Function FindVisualChildByName(Of T As FrameworkElement)(parent As DependencyObject, name As String) As T Dim child As T = Nothing For i As Integer = 0 To VisualTreeHelper.GetChildrenCount(parent) - 1 Dim ch = VisualTreeHelper.GetChild(parent, i) child = TryCast(ch, T) If child IsNot Nothing AndAlso child.Name = name Then Exit For Else child = FindVisualChildByName(Of T)(ch, name) End

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

RelativeSource in DataTemplate works with TabControl but not with TabItem

对着背影说爱祢 提交于 2019-12-18 08:55:57
问题 I am having a TabControl and within it a TabItem having a ContentControl. This ContentControl is applied a datatemplate. The code is here: <TabControl x:Name="tabControl1" Tag="Giving URI here works"> <TabItem x:Name="tabItem1" Tag="Giving URI here doesnt work"> <ContentControl ContentTemplate="{StaticResource myOptionsDataTemplate}"> <StackPanel> <TextBlock Text="Some Text" /> </StackPanel> </ContentControl> </TabItem> </TabControl> And the data template is: <DataTemplate x:Key=

WPF - Overlapping Custom Tabs in a TabControl and ZIndex

£可爱£侵袭症+ 提交于 2019-12-18 04:44:11
问题 Problem I have a custom tab control using Chrome-shaped tabs that binds to a ViewModel. Because of the shape, the edges overlap a bit. I have a function that sets the tabItem's ZIndex on TabControl_SelectionChanged which works fine for selecting tabs, and dragging/dropping tabs, however when I Add or Close a tab via a Relay Command I am getting unusual results. Does anyone have any ideas? Default view: Removing Tabs: Adding 2 or more Tabs in a row: Adding more then 1 tab at a time will not

SketchFlow / Using (Selected) TabItem in TabControl to Trigger State

风流意气都作罢 提交于 2019-12-13 21:15:47
问题 Context: A new Sketchflow / Silverlight project. Expression Blend 4 (Ultimate) I have the below code. I have a TabControl with 2 TabItem's. I also have 2 "callout" (big bubble things) as quick visual on the state change. I created a VisualStateGroup and added to States under it. When I manually invoke these from the NAVIGATE window (after I run the project), the states work as expected. callout1 and callout2 flip flop their opacities (between 100% and 10%). So I have a basic understanding of

How to disable the dashed contour for TabItem?

笑着哭i 提交于 2019-12-13 02:48:44
问题 When a TabItem has focus it shows an inner dashed countour. How to make it transparent or to disabling it to get focus at all? 回答1: If you're talking about the FocusVisualStyle you can remove it by adding the following to your TabControl <TabControl ...> <TabControl.Resources> <Style TargetType="TabItem"> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> </Style> </TabControl.Resources> <!-- ... --> </TabControl> Update To make sure we're talking about the same thing Selected with

Dragging over a tab to bring to front

♀尐吖头ヾ 提交于 2019-12-12 20:02:54
问题 I'm dragging data from outside my application onto a TabControl. I'd like to be able to drag over a "tab" and have that tab brought to the front. The drag events on the TabControl and the TabItems only seem to fire for the active tab, and only fire when dragging over the tab content, not the "tab" itself. The markup for the control is: <Window x:Class="DragOverTabExample.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx

WPF: TabControl and dynamic TabItems

落花浮王杯 提交于 2019-12-12 12:22:59
问题 I am trying to create a GUI for my current project using WPF in C#. I would like to have tabs (dynamically created at runtime) and each tab should open a table with the same column headers but different contents. I know I could realize tabs and tables like this: <Grid> <TabControl x:Name="tabControl" TabStripPlacement="Left"> <TabItem Header="Example 1" x:Name="tabItem" > <DataGrid ItemsSource="{Binding TagCollection.Tags}" AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridTextColumn

How to get a TabControl to resize with other members inside of it

泄露秘密 提交于 2019-12-12 05:58:26
问题 I know that TabControl is not an item that automatically resizes, and that you can anchor it to a side and then set it to stretch and that may fix the problem, but are there any other ways to get the TabControl to expand to fullscreen when application is maximized? while also having all the properties expand and stay proportionate as well. And can this be done in the XAML rather than the code behind as I created everything within the XAML? Bellow is a snip of the code for the MainWindow of