Intersoft.Client.Documents Namespace > Block Class : Borders Property |
<TypeConverterAttribute("Intersoft.Client.Documents.BorderConverter, Intersoft.Client.Documents, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=c3d9b11444163e76")> Public Property Borders As BorderStyle
Dim instance As Block Dim value As BorderStyle instance.Borders = value value = instance.Borders
[TypeConverterAttribute("Intersoft.Client.Documents.BorderConverter, Intersoft.Client.Documents, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=c3d9b11444163e76")] public BorderStyle Borders {get; set;}
[TypeConverterAttribute("Intersoft.Client.Documents.BorderConverter, Intersoft.Client.Documents, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=c3d9b11444163e76")] public: property BorderStyle^ Borders { BorderStyle^ get(); void set ( BorderStyle^ value); }
You can simplify the above configuration and use only one property, Borders, to specify the border configuration globally or individually. Borders property accepts comma and semicolon separated string. The pattern is [border width],[border line style],[border brush]. For example: Borders="1,Single,#FF000000" will set the border configuration to 1 pixel width, Single border line style, and black color brush. Note that the pattern cannot be swapped and you must use hexadecimal format to determine the border brush.
XAML |
Copy Code
|
---|---|
<Intersoft:FlowDocument> <Intersoft:Paragraph Padding="10" Borders="1,Single,#FFFF00FF"> <Intersoft:Run> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </Intersoft:Run> </Intersoft:Paragraph> </Intersoft:FlowDocument> |
To use Borders property for individual border side configuration, repeat the pattern and separate them with semicolon. If there are two border definitions separated by semicolon, the first one will be applied to the left and right borders, and the second one will be applied to the top and bottom borders. If there are four border definitions separated by semicolon, the first one will be applied to the left border, the second one to the top border, the third one to the right border, and the last one to the bottom border. For example: Border="1,Single,#FF000000;2,Dot,#FFFF0000" will set the 1 pixel width, Single border line style, and black color brush to the left and right border, and 2 pixel width, Dot border line style, and red color brush to the top and bottom border.
XAML |
Copy Code
|
---|---|
<Intersoft:FlowDocument> <Intersoft:Paragraph Padding="10" Borders="1,Single,#FFFF00FF;1,DashDot,#FF0066FF"> <Intersoft:Run> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </Intersoft:Run> </Intersoft:Paragraph> </Intersoft:FlowDocument> |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2