Created
June 18, 2012 07:06
-
-
Save pinzolo/2947230 to your computer and use it in GitHub Desktop.
タブを非表示にしたタブコントロール
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="MktSys.Gui.NoHeaderTabItemWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="タブのない TabControl" Height="525" Width="300"> | |
<Window.Resources> | |
<!-- | |
フォーカスがあたらないように IsTabStop を False | |
LayoutTransFormで無理やりタブを非表示にする | |
--> | |
<Style x:Key="noHeaderTabItemStyle" TargetType="{x:Type TabItem}"> | |
<Setter Property="IsTabStop" Value="False" /> | |
<Setter Property="LayoutTransform"> | |
<Setter.Value> | |
<TransformGroup> | |
<ScaleTransform ScaleY="0"/> | |
<SkewTransform/> | |
<RotateTransform/> | |
<TranslateTransform/> | |
</TransformGroup> | |
</Setter.Value> | |
</Setter> | |
</Style> | |
</Window.Resources> | |
<Grid> | |
<TabControl Name="tabControl"> | |
<TabItem Header="変数" Name="editVriableTabItem" Style="noHeaderTabItemStyle"> | |
<Grid> | |
</Grid> | |
</TabItem> | |
</TabControl> | |
</Grid> | |
</Window> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment