Rocketq
Rocketq

Reputation: 5791

How to set Separator`s color to invisible in WPF?

This how it looks now:

    <Separator Height="10" Margin="0" Width="168" 
     HorizontalAlignment="Center" VerticalAlignment="Top" 
     Background="SteelBlue"/>

The problem, that I don't know what color Background will be needed? Is there any way out? Or need to know what color I need?

Upvotes: 0

Views: 1834

Answers (2)

yushulx
yushulx

Reputation: 12160

You can use transparent

<Separator Height="10" Margin="0" Width="168" 
     HorizontalAlignment="Center" VerticalAlignment="Top" 
     Background="Transparent"/>

Upvotes: 1

Herm
Herm

Reputation: 2997

"Invisible" Brush in WPF is called Transparent, you can set Background="Transparent" to set the Separator to invisble.

Or you can set the Visibiliy="Hidden" to preserve the space of the control without showing it.

Upvotes: 2

Related Questions