Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A vertical Separator control in a Menu, Toolbar, StackPanel, etc. - Is it possible?

I want to use the Separator control in a vertical way (Lets say in a horizontal StackPanel).

Searching around I found this method but it doesn't use the Separator control rather it uses borders and rectangles. https://social.msdn.microsoft.com/forums/en-US/wpf/thread/eab865be-ad9b-45ed-b9d8-fc93f737b163

Is it possible to use the Separator control in a vertical way?

like image 425
Randall Flagg Avatar asked Oct 25 '10 02:10

Randall Flagg


People also ask

What is a simple toolbar separator class?

Summary. A simple class that adds a vertical separator bar between toolbar items (css class: 'x-toolbar-separator').

What is separator in WPF?

Separators are rendered as part of the list but are not selectable in the same way as the actual items. They provide a visual distinction between sets of related options. To demonstrate, create a new WPF application in Visual Studio, naming the solution, "SeparatorDemo".

How do you draw a horizontal line in WPF?

To draw a line, create a Line element. Use its X1 and Y1 properties to set its start point; and use its X2 and Y2 properties to set its end point. Finally, set its Stroke and StrokeThickness because a line without a stroke is invisible. Setting the Fill element for a line has no effect, because a line has no interior.


1 Answers

Also:

<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" /> 
like image 186
mletterle Avatar answered Sep 25 '22 00:09

mletterle