Alexey Titov
Alexey Titov

Reputation: 353

How to set Visibility.Collapsed as Tag's value

I need a listbox to store 'Visible' or 'Collapsed' enum value in its 'Tag' property, something like:

<ListBox Tag="{x: ... Visible}"/>

How can I make that?

Upvotes: 1

Views: 95

Answers (1)

Alex Butenko
Alex Butenko

Reputation: 3764

<ListBox xmlns:wpf="clr-namespace:System.Windows;assembly=PresentationCore"               
         Tag="{x:Static wpf:Visibility.Visible}"/>

Upvotes: 2

Related Questions