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
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)