自定义Stackpanel中的滚动条出现问题 [英] problem with Scrollbar in Custom Stackpanel

查看:73
本文介绍了自定义Stackpanel中的滚动条出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我在自定义Stackpanel"中出现滚动条问题
我的源代码是:

hi all
i''ve problem with Scrollbar in Custom Stackpanel
my Source code is :

Imports System.Windows.Media.Animation

Public Class OpacityPanel
    Inherits StackPanel

    '===============================
    Protected Overrides Function MeasureOverride(ByVal availableSize As System.Windows.Size) As System.Windows.Size
        '====================
        'Any Animation for childs
        '====================
        Dim maxSize As New Size()
        For Each child As UIElement In InternalChildren
            child.Measure(availableSize)
            maxSize.Height = Math.Max(child.DesiredSize.Height, maxSize.Height)
            maxSize.Width = Math.Max(child.DesiredSize.Width, maxSize.Width)
        Next
    End Function
    '================================

End Class



但这不是给我滚动
请帮助我
thanx.



but it''s not give scroll to me
please help me
thanx.

推荐答案

可能是愚蠢的问题,但 ^ ]对您不起作用?
May be stupid question but ScrollViewer[^] doesn''t work for you?


这篇关于自定义Stackpanel中的滚动条出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆