Example #1
0
        public void PreHide()
        {
            var backup = new GridExpandBehaviorBackupInfo(Element);

            FrameworkElementAtt.SetGridExpanderBehavior_Backup(Element, backup);

            if (IsHorizontal)
            {
                Element.Width = Element.ActualWidth;
                Element.HorizontalAlignment = Dock == Dock.Right ? HorizontalAlignment.Right : HorizontalAlignment.Left;
            }
            else
            {
                Element.Height            = Element.ActualHeight;
                Element.VerticalAlignment = Dock == Dock.Bottom ? VerticalAlignment.Bottom : VerticalAlignment.Top;
            }
        }
Example #2
0
 public static void SetGridExpanderBehavior_Backup(DependencyObject obj, GridExpandBehaviorBackupInfo value)
 {
     obj.SetValue(GridExpanderBehavior_BackupProperty, value);
 }