Answer the question
In order to leave comments, you need to log in
How to get element properties?
Good afternoon everyone. Help me please. When accessing ListCheckBox.Children (ListCheckBox is
<StackPanel x:Name="ListCheckBox" Margin="0" Width="284">
), then I only get the properties of the UI, but how do I get the properties of the element? <StackPanel x:Name="ListCheckBox" Margin="0" Width="284">
<CheckBox x:Name="All" Content="Выбрать все" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="1,1,1,5" IsChecked="True"/>
</StackPanel>
Answer the question
In order to leave comments, you need to log in
I figured out how to do it)
foreach (object child in ListCheckBox.Children)
{
var element = child as CheckBox;
if (!element.Name.Equals("All"))
element.IsChecked = All.IsChecked;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question