我怎样才能使Scrollviewer成为UserControl [英] How can i make Scrollviewer to UserControl
本文介绍了我怎样才能使Scrollviewer成为UserControl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
如何使scrollviewer成为UserControl?
但是我想将scrollviewer改为UserControl而不用于Grid吗?
那么,如何使scrollviewer成为UserControl?
我的代码是
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
<ScrollViewer>
<Grid ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
</Grid>
</ScrollViewer>
推荐答案
不确定您要问什么,但这是一个具有ScrollViewer外观的UserControl:
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>
试试这个:
try this:
<scrollviewer>
<uc1 height="100" width="100">
</uc1>
</scrollviewer>
这篇关于我怎样才能使Scrollviewer成为UserControl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文