This question is locked. New answers and comments are not allowed.
Hello,
Is it possible to set the content of an Expander in code behind? For example, a certain grid or stackpanel with its own children controls... something like this:
but I'd like to set the Grid in code behind instead.
Thanks in advance!
Is it possible to set the content of an Expander in code behind? For example, a certain grid or stackpanel with its own children controls... something like this:
<telerik:RadExpander Grid.Row="0" Header="{Binding Strings.Parameters, Source={StaticResource LocalizedStrings}}" Name="radExpanderParameters" Width="Auto" IsExpanded="True" > <Grid Name="gridType" Grid.Row="0" Grid.Column="1" VerticalAlignment="Stretch" ShowGridLines="False"> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="2*" /> </Grid.RowDefinitions> <StackPanel Grid.Row="0" Margin="10" VerticalAlignment="Center"> <RadioButton Margin="3" Content="Type 1" Height="16" GroupName="QueryType" x:Name="radioButton1" IsChecked="{Binding QueryType, Mode=TwoWay, ConverterParameter=current, Converter={StaticResource RadioButtonConverter}}" /> <RadioButton Margin="3" Content="Type 2" Height="16" GroupName="QueryType" Name="radioButton2" IsChecked="{Binding QueryType, Mode=TwoWay, ConverterParameter=historical, Converter={StaticResource RadioButtonConverter}}" /> <RadioButton Margin="3" Content="Type 3" Height="16" GroupName="QueryType" Name="radioButton3" IsChecked="{Binding QueryType, Mode=TwoWay, ConverterParameter=prediction, Converter={StaticResource RadioButtonConverter}}" /> </StackPanel> <StackPanel Grid.Row="1" Margin="10"> </StackPanel> </Grid> </telerik:RadExpander>but I'd like to set the Grid in code behind instead.
Thanks in advance!