Ejemplo n.º 1
0
        public ActivityContainer()
        {
            View = new ActivityView(); //must set the view first

            InitializeComponent();
            InitializeView();

            BindingUtils.RegisterForNotification("ContentOffsetX", zuiContainer.ZoomHost, (d, e) => { if (View != null)
                                                                                                      {
                                                                                                          View.ViewPosition = new Point(zuiContainer.ZoomHost.ContentOffsetX, zuiContainer.ZoomHost.ContentOffsetY);
                                                                                                      }
                                                 });
            BindingUtils.RegisterForNotification("ContentOffsetY", zuiContainer.ZoomHost, (d, e) => { if (View != null)
                                                                                                      {
                                                                                                          View.ViewPosition = new Point(zuiContainer.ZoomHost.ContentOffsetX, zuiContainer.ZoomHost.ContentOffsetY);
                                                                                                      }
                                                 });
            BindingUtils.RegisterForNotification("ContentViewportWidth", zuiContainer.ZoomHost, (d, e) => { if (View != null)
                                                                                                            {
                                                                                                                View.ViewWidth = (double)e.NewValue;
                                                                                                            }
                                                 });
            BindingUtils.RegisterForNotification("ContentViewportHeight", zuiContainer.ZoomHost, (d, e) => { if (View != null)
                                                                                                             {
                                                                                                                 View.ViewHeight = (double)e.NewValue;
                                                                                                             }
                                                 });

            LoadParts();
        }