user1153545
user1153545

Reputation: 13

listbox control of windows phone

            <ListBoxItem Content="A " />
        </ListBox>

-> above is my listbox in xaml file

-> how to change the visibility of Listbox item "A" programmatically using itself only

Upvotes: 0

Views: 295

Answers (1)

Alekstim
Alekstim

Reputation: 462

Try this:

(list.Items[0] as ListBoxItem).Visibility = Visibility.Visible;

You forgot about cast

Upvotes: 3

Related Questions