I am new to xaml and wpf.
I am trying to insert some user controls into a container from code. I read this MSDN blog post .
I tried all the methods used there, and some others, but the scroll bar was never included.
My current code I'm stuck is this:
<DockPanel>
<ScrollViewer HorizontalAlignment="Left" Margin="252,12,0,0">
<ItemsControl Name="captchaControls" Width="339" Height="286">
</ItemsControl>
</ScrollViewer>
</DockPanel>
Does anyone know why?
EDIT:
Did it like this:
<DockPanel>
<ScrollViewer HorizontalAlignment="Left" Margin="252,12,0,0" Width="339" Height="286">
<ItemsControl Name="captchaControls">
</ItemsControl>
</ScrollViewer>
</DockPanel>
Para source
share