Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all
how can i make scrollviewer to UserControl?

But I want scrollviewer to UserControl not for Grid?

So, how can i make scrollviewer to UserControl?


my code is
XML
<ScrollViewer>

        <Grid ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
 </Grid>
        
</ScrollViewer>
Posted
Updated 16-Jul-12 3:22am
v4
Comments
[no name] 16-Jul-12 9:16am    
What is wrong with what you have?
U@007 16-Jul-12 9:22am    
When i resize the UserControl Scrollviewer not showing for usercontrol.

So how can i do this? for scrollviewer.
BoySetsFire 16-Jul-12 9:40am    
Force the Resize....
http://social.msdn.microsoft.com/Forums/en/wpf/thread/9fe240ea-cc56-412c-8549-224b0a95ae57

Not sure about what you are asking, but here is a UserControl that has a root visual of ScrollViewer:

<usercontrol x:class="WpfApplication1.UserControl1" xmlns:x="#unknown">
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <scrollviewer>
	</scrollviewer>
</usercontrol>
 
Share this answer
 
hi,
try this:


<scrollviewer>
<uc1 height="100" width="100">
</uc1>
</scrollviewer>
 
Share this answer
 
Comments
U@007 16-Jul-12 9:42am    
putting insted of this how do u refere .dll man?

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