Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Horizontal separator with a line and a label in C# WPF window

Tags:

c#

wpf

In a C# WPF window, what control can I use to create a separator with a text label, for example:

Example

Note: I am aware of <separator/> (as in the answer to the alleged duplicate question), but I couldn't find how to add a text label to it.

like image 895
Victor Avatar asked Feb 08 '18 20:02

Victor


1 Answers

Try this,

    <DockPanel Height="25">
        <Label DockPanel.Dock="Left" Content="SomeText"/>
        <Separator/>
    </DockPanel>
like image 172
Aleksandar Avatar answered Oct 21 '22 02:10

Aleksandar