Click here to Skip to main content
15,399,959 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi All,

I am working in WPF application(developing UI), I need to display the window along with few contents(txt,image) during launch, but the contents/images needs to be displayed though window resizes, ie., I need to implement ScrollViewer feature, to display the contents on resize of window,
Also, In addition the window should possess HSCROLL bar and VSCROLL bar, how can one implement both features viz., ScrollViewer as well HSCROLL,VSCROLL.

<StackPanel Orientation="Horizontal">
        <Image Name="ProductImage" Width="32" Height="32" />
        <TextBlock Name="ProductText" Margin="5,0" FontSize="24" Width="392"/>
<ScrollViewer Height="203" VerticalScrollBarVisibility="Auto" Grid.Row="1" Margin="5,5,5,5">
    <wfi:WindowsFormsHost Height="333">
        <wf:DataGridView x:Name="dataGridView1" >

I am using Windows 7 O/S, SP1 & VS 2008 IDE
Thanks in Advance.

With Regards,
Updated 3-Nov-17 1:49am

I answered a similar (well the same) question a few hours ago!

Implementing Scrollbar(HSCROLL/VSCROLL) using Scrollviewer[^]
Richard Deeming 6-Nov-17 14:23pm
You're missing "p", "a" and "m" from your SPAM answer!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900