Set the width of a flyout window

Aug 2, 2012 at 6:55 PM

I have a LayoutAnchorableItem that has CanHide set to true. 

When I press the push pin to hide it, then fly it out again (but not pinned), the width is about 100 pixels.

How can I change this to be a custom amout of pixels?  (I have tried Width, and MinWidth and they have no effect.)

Aug 3, 2012 at 3:02 PM
Edited Aug 3, 2012 at 3:09 PM

Here is my work around for this issue (in case anyone else is interested):

        public DockView()
            dockManager.LayoutUpdated += OnLayoutUpdated;
        private void OnLayoutUpdated(object sender, EventArgs e)
        public void ResetAutoHiddenSizes()
            if ((MyCustomPane != null) && (MyCustomPane.Root != null) 
&& (MyCustomPane.Root.RightSide != null))             {                 foreach (LayoutAnchorGroup layoutAnchorGroup in MyCustomPane.Root.RightSide.Children)                 {                     foreach (LayoutAnchorable layoutAnchorable in layoutAnchorGroup.Children)                     {                         if (layoutAnchorable.AutoHideWidth < 200)                             layoutAnchorable.AutoHideWidth = 300;                     }                 }             }         }

LayoutUpdated is called A LOT.  So make sure you don't put any logic in here that is long running.

If this WorkItem is done then these values could be set in an MVVM like fashion (and in a lot more focused way).  (That assumes that there is not already a better way to do this that I don't know.)