Пример #1
0
        public static void Test()
        {
            CollapsibleRegion cr = new CollapsibleRegion();

            cr.VisibleEdge = Dock.Bottom;
            WrapPanel sp = new WrapPanel();

            sp.Children.Add(cr);
            ControlHostingWindow w = new ControlHostingWindow("", sp);

            w.Show();
        }
        public static void CloseHostedControl(FrameworkElement control)
        {
            ControlHostingWindow chw = GUITools.GetParentControl <ControlHostingWindow>(control);

            if (null != chw)
            {
                chw.Close();
            }
            else
            {
                Logging.Warn("ControlHostingWindow is not a parent of {0}", control.ToString());
            }
        }