Good day to all!
The form has an ItemsControl. In the constructor of each item, there is a ComboBox in which the user selects the command he needs.
The question is how to determine the further construction of the item'a. For example, the user chose "Availability ..." and then a ComboBox should appear with a choice of a vehicle number and a ComboBox with a choice of type. Further, if the user selects "Get" in the type, nothing more should appear on the form, and if he selected "Set" in the type, then a field should appear to enter the value.
I would be glad if you shared information or links to the implementation of such structures. Interested in both setting up the interface and setting up the item class itself, which is created.
Code example:
<ItemsControl.ItemTemplate> <DataTemplate> <Border Width="350" Height="200" Background="DarkRed" BorderBrush="White" BorderThickness="2" CornerRadius="5" Margin="0,5,0,0"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto"></ColumnDefinition> <ColumnDefinition Width="auto"></ColumnDefinition> <ColumnDefinition Width="auto"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="auto"></RowDefinition> <RowDefinition Height="auto"></RowDefinition> </Grid.RowDefinitions> <ComboBox ItemsSource="{Binding Path=CommandNameList}" SelectedIndex="{Binding Path=CommandNameSelected}"></ComboBox> </Grid> </Border> </DataTemplate> </ItemsControl.ItemTemplate> 
ComboBoxin the constructor? What is it like? give the code - Andrew NOP