我对xaml和wpf比较陌生。
我试图从代码后台将一些用户控件插入到容器中。
我阅读了这篇有关MSDN的博客文章。
我尝试了那里面介绍的所有方法以及其他一些方法,但是滚动条从未启用过。
我现在困在这段代码中:
<DockPanel>
<ScrollViewer HorizontalAlignment="Left" Margin="252,12,0,0">
<ItemsControl Name="captchaControls" Width="339" Height="286">
</ItemsControl>
</ScrollViewer>
</DockPanel>
有人知道为什么吗?
编辑:
按照以下方式使其工作:
<DockPanel>
<ScrollViewer HorizontalAlignment="Left" Margin="252,12,0,0" Width="339" Height="286">
<ItemsControl Name="captchaControls">
</ItemsControl>
</ScrollViewer>
</DockPanel>
this.*
一样毫无意义,实际上更甚,因为它甚至不能显示出作用域之间的差异。 - H.B.