Skip to content

The dividing line that separates the content.

cs
public class Divider : Control

Attributes

PropertyDescriptionDefault ValueRemarks
ContentContent
OrientationOrientation
ContentTemplateContent Template
ContentStringFormatContent String Format
ContentTemplateSelectorContent Template
LineStrokeDividing line color
LineStrokeThicknessDividing line thickness1
LineStrokeDashArrayDividing line gap

Case

xml
<WrapPanel Margin="16">
    <StackPanel Margin="16" Width="300">
        <hc:Divider/>
        <hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}"/>
        <hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Padding="10,0"/>
        <hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}"/>
        <hc:Divider LineStrokeDashArray="2,2"/>
    </StackPanel>
    <StackPanel Margin="16" Width="300">
        <hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}" HorizontalContentAlignment="Left"/>
        <hc:Divider Content="{ex:Lang Key={x:Static langs:LangKeys.Title}}" Padding="10,0"  HorizontalContentAlignment="Right"/>
        <StackPanel Orientation="Horizontal">
            <Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
            <hc:Divider Orientation="Vertical" MaxHeight="16"/>
            <Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
            <hc:Divider Orientation="Vertical" MaxHeight="16"/>
            <Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal" Margin="0,16,0,0">
            <Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
            <hc:Divider LineStrokeThickness="2" Orientation="Vertical" MaxHeight="16"/>
            <Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
            <hc:Divider LineStrokeThickness="2" Orientation="Vertical" MaxHeight="16"/>
            <Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal" Margin="0,16,0,0">
            <Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
            <hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}" Orientation="Vertical" MaxHeight="16"/>
            <Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
            <hc:Divider LineStrokeThickness="2" LineStroke="{DynamicResource DarkPrimaryBrush}" Orientation="Vertical" MaxHeight="16"/>
            <Button Content="{ex:Lang Key={x:Static langs:LangKeys.Button}}"/>
        </StackPanel>
    </StackPanel>
</WrapPanel>

Divider

Released under the MIT License.