有没有办法在运行时创建像这样的 xaml 波纹管的子扩展器?
<Expander Header="Building" IsExpanded="True">
<StackPanel>
<Expander Header="Sales">
<StackPanel>
<TextBlock>6100</TextBlock>
<TextBlock>6101</TextBlock>
<TextBlock>6111</TextBlock>
<TextBlock>6150</TextBlock>
</StackPanel>
</Expander>
<Expander Header="Director">
<StackPanel>
<TextBlock>6102</TextBlock>
<TextBlock>6113</TextBlock>
</StackPanel>
</Expander>
</StackPanel>
</Expander>