private void CreateWebWindow()
 {
     Point p = PART_Web.TransformToAncestor(this).Transform(new Point(0, 0));
     double x = p.X;
     double y = p.Y;
     webWnd = new WebWindow(roomWindowVM);
     webWnd.OffsetX = x;
     webWnd.OffsetY = y;
     webWnd.ReplicatedControl = PART_Web;
     webWnd.Top = Top + webWnd.OffsetY;
     webWnd.Left = Left + webWnd.OffsetX;
     webWnd.Owner = this;
     webWnd.Show();
     webWnd.Topmost = false;
     webWnd.Show();
     //Point p = PART_Web.TransformToAncestor(this).Transform(new Point(0, 0));
     //double x = p.X;
     //double y = p.Y;
     //return CreateWindowInSeparateThread<WebWindowAction>(() =>
     //{
     //    return new WebWindow(roomWindowVM);
     //},
     //    x, y, false, true, PART_Web);
 }
Пример #2
0
        private void EssentialWindow_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                Point p = PART_Web.TransformToAncestor(this).Transform(new Point(0, 0));
                double x = p.X;
                double y = p.Y;
                webWindow = new WebWindow(hallVM);
                webWindow.SetParent<HallWindowAction>(this, true);
                webWindow.OffsetX = x;
                webWindow.OffsetY = y;
                webWindow.ReplicatedControl = PART_Web;
                webWindow.Top = Top + webWindow.OffsetY;
                webWindow.Left = Left + webWindow.OffsetX;
                webWindow.Owner = this;
                webWindow.Topmost = false;
                webWindow.Show();
            }
            catch (Exception ex)
            {
                Helper.Logger.Error("EssentialWindow_Loaded", ex);
            }

            //Point p = PART_Web.TransformToAncestor(this).Transform(new Point(0, 0));
            //double x = p.X;
            //double y = p.Y;
            //webWindow = CreateWindowInSeparateThread<WebWindowAction>(() =>
            //{
            //    return new WebWindow(hallVM);
            //},
            //    x, y, false, true, PART_Web) as WebWindow;
        }
Пример #3
0
 private Window CreateWebWindow()
 {
     Point p = PART_Web.TransformToAncestor(this).Transform(new Point(0, 0));
     double x = p.X;
     double y = p.Y;
     YoYoStudio.Controls.CustomWindow.ChildWindow<WebWindowAction> webWindow = new WebWindow(roomWindowVM);
     //webWindow = new WebWindow(roomWindowVM);
     webWindow.SetParent<RoomWindowAction>(this, true);
     webWindow.OffsetX = x;
     webWindow.OffsetY = y;
     webWindow.ReplicatedControl = PART_Web;
     webWindow.Top = Top + webWindow.OffsetY;
     webWindow.Left = Left + webWindow.OffsetX;
     
     webWindow.Owner = this;
     webWindow.Show();
     webWindow.Topmost = false;
     return webWindow;
     //Point p = PART_Web.TransformToAncestor(this).Transform(new Point(0, 0));
     //double x = p.X;
     //double y = p.Y;
     //return CreateWindowInSeparateThread<WebWindowAction>(() =>
     //{
     //    return new WebWindow(roomWindowVM);
     //},
     //    x, y, false, true, PART_Web);
 }