如何制作Silverlight TabControl
垂直排列标签?
答案 0 :(得分:4)
TabControl格式化(右对齐和垂直文本)
<Controls2:TabControl HorizontalContentAlignment="Right" HorizontalAlignment="Right" TabStripPlacement="Left"></Controls2:TabControl>
答案 1 :(得分:0)
确保已安装silverlight工具包,然后使用旋转布局转动标签页眉。
<UserControl xmlns:controls=”clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls”
x:Class=”SilverlightApplication18.MainPage”
xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation“
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml“
xmlns:toolkit=”clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit”
Width=”400″ Height=”300″>
<Grid x:Name=”LayoutRoot” Background=”White”>
<controls:TabControl Margin=”10″ TabStripPlacement=”Left”>
<controls:TabItem >
<controls:TabItem.Header>
<toolkit:LayoutTransformer >
<TextBlock Text=”Tab1″/>
<toolkit:LayoutTransformer.LayoutTransform>
<RotateTransform Angle=”-90″></RotateTransform>
</toolkit:LayoutTransformer.LayoutTransform>
</toolkit:LayoutTransformer>
</controls:TabItem.Header>
<TextBlock Margin=”10″ Text=”some content in Tab1″/>
</controls:TabItem>
结果如下: !
可能我无法上传图片,结果会是这样,但所有文字在实际结果中都会旋转-90。
+--+------------------------------
|l |
|a |
|c |
|i |
|t |
|r |
|e |
|v |
+--+
|
|
+--------------------------------
相关文章为here