Xceed Toolkit for .NET Maui v2.0 Documentation
Xceed.Maui.Toolkit Assembly / Xceed.Maui.Toolkit Namespace / Border Class
Members Example


In This Topic
    Border Class
    In This Topic
    Similar to the Framework's Border control, but with more flexibility than said control.
    Syntax
    'Usage
     
    
    Dim instance As Border
    Remarks

    The first reason for this control's flexibility is that the ThicknessCornerRadius of all 4 sides of the Border can be set independently.

    On top of that, any View control can be set as the Border's Content & aligned easily through the HorizontalContentOptionsVerticalContentOptions properties.

    Finally, the Border's Content will also inherit the TextColorFontAttributesFontSizeFontFamily properties when they are set.

    Example

    The following code will surround the inserted Content with this type of Border:

    <xctk:Border HeightRequest="96"
                 WidthRequest="120"
                 BorderThickness="10,6,5,9"
                 CornerRadius="40,10,0,20"
                 TextColor="Red"
                 HorizontalContentOptions="Center"
                 VerticalContentOptions="Center"
                 Margin="20"
                 BorderBrush="Orange">
     <VerticalStackLayout>
      <Label Text="My"/>
      <Label Text="Border"/>
     </VerticalStackLayout>
    </xctk:Border>
    Inheritance Hierarchy

    System.Object
       Microsoft.Maui.Controls.BindableObject
          Microsoft.Maui.Controls.Element
             Microsoft.Maui.Controls.NavigableElement
                Microsoft.Maui.Controls.VisualElement
                   Microsoft.Maui.Controls.View
                      Microsoft.Maui.Controls.Compatibility.Layout
                         Microsoft.Maui.Controls.TemplatedView
                            Xceed.Maui.Toolkit.Control
                               Xceed.Maui.Toolkit.Border

    Requirements

    Target Platforms: Windows 11, Windows 10, 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

    See Also