2013年(21)
分类: C#/.net
2013-08-20 15:23:18
WPF - WPF to create Xaml Vertical Bar
Topic: WPF - WPF to create Xaml Vertical Bar
标题: WPF – 创建vertical bar/seprator的方法
本文主要是一些常用的技巧,教你如何去创建separator/vertical bars.
Nothing special, trying to make separator/vertical bars in various ways.
在下面的方法中, 如下可以用来创建一些Vertical bars.
Out the following means, the following can be used to construct the Vertical bars.
1. Label
2. Line
3. Separator
4. Rectangle
5. Border
如下是可以预见的xaml代码。
Here is the test code that you can leverage to create Vertical Bar/Seperator.
xmlns=""
xmlns:x=""
Title="MainWindow"
Height="350" Width="525">
Width="4"
Height="30"
Margin="5,0,3,0"
BorderThickness="1,0,1,0"
BorderBrush="Red"
Grid.Column="1"
Background="Purple"
/>
HorizontalAlignment="Stretch"
Fill="White"
Height="30"
Width="3"
Grid.Column="2"/>
Margin="6,0,2,0"
Stretch="Fill"
Stroke="White"
X1="0"
X2="0"
Y1="0"
Y2="25"
Grid.Column="3"/>
Grid.Column="4"
Margin="5, 0, 0, 0"
HorizontalAlignment="Center"
>
Screenshot as follow.
引用:
References: