In my WPF program, I have a control ListBox:
<ListBox x:Name="mailsListBox" SelectionChanged="mailsListBox_SelectionChanged" >
<ListBoxItem Content="..." Background="#FFF3F3F3" Margin="0,0,0,1" />
<ListBoxItem Content="...." Margin="0,0,0,1" Visibility="Hidden"/>
</ListBox>
How can I access the Visibilityproperty ListBoxItems? My code does not work:
mailsListBox.Items[1].Visibility = Visible;
source
share