[WPF] UniformGrid 元素能不能通过C#代码调用?
<Grid>
<ListBox Height="110" HorizontalAlignment="Left" Margin="282,12,0,0" Name="listBox1" VerticalAlignment="Top" Width="193" SelectionMode="Extended">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Name="ufgrid1"></UniformGrid>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
</Grid>
<ItemsPanelTemplate>
<UniformGrid IsItemsHost="True" Columns="{Binding Path=MyColumnCount}"
VerticalAlignment="Top" />
</ItemsPanelTemplate>