private void AddAllClick(object sender, RoutedEventArgs e)
        {
            double x      = 10;
            double y      = 10;
            double x_size = 0;
            double y_size = 0;

            foreach (Panel p in m_panels)
            {
                Panel panel = (Panel)p.Clone();
                panel.Origin = new Point(x, y);
                GeometryOperations.ComputeSize(panel.Points, out x_size, out y_size);
                y += y_size * 1.1;
                LayoutControl.AddPanel(panel);
            }
        }
        private void AddPanelClick(object sender, RoutedEventArgs e)
        {
            MenuItem item      = (MenuItem)e.Source;
            String   panelName = item.Header.ToString();

            Point loc = Mouse.GetPosition(LayoutControl);

            loc.X /= LayoutControl.Layout.Scale;
            loc.Y /= LayoutControl.Layout.Scale;

            foreach (Panel panel in m_panels)
            {
                if (panelName == panel.name)
                {
                    Panel p = (Panel)panel.Clone();
                    p.Origin = loc;
                    LayoutControl.AddPanel(p);
                    break;
                }
            }
        }