3
的可視性財產在我的WPF程序中,我有一個ListBox
控制:如何訪問ListBoxItems
<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>
我如何可以訪問ListBoxItems
的Visibility
財產?我的代碼不工作:
mailsListBox.Items[1].Visibility = Visible;