Set panel width/height in code

Jul 17, 2014 at 9:34 AM

when a panel is shown using .ToggleAutoHide() it only has a width of somewhat 20 or 30 pixels. how can I set the width it should consume when being pinned/shown?

regards, Tilli
Jul 17, 2014 at 9:47 AM
I found a solution - although I can't find a way to specify default size in XAML:
var parent = PropertiesPanel.Parent as LayoutAnchorablePane;
if (parent != null)
    parent.FloatingWidth = 400;
    parent.DockWidth = new GridLength(parent.FloatingWidth);