Ejemplo n.º 1
0
 public AnnotationControl()
 {
     if (instance != null)
     {
         throw(new System.Exception("Error: Cannot create more than one instance of ANNOTATIONCONTROL!"));
     }
     instance = this;
 }
Ejemplo n.º 2
0
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            PART_CloseButton       = GetTemplateChild(nameof(PART_CloseButton)) as Button;
            PART_FullscreenButton  = GetTemplateChild(nameof(PART_FullscreenButton)) as Button;
            PART_LockButton        = GetTemplateChild(nameof(PART_LockButton)) as ToggleButton;
            PART_Transform         = GetTemplateChild(nameof(PART_Transform)) as CompositeTransform;
            PART_ControlTransform  = GetTemplateChild(nameof(PART_ControlTransform)) as CompositeTransform;
            PART_ScreenshotButton  = GetTemplateChild(nameof(PART_ScreenshotButton)) as Button;
            PART_ContentContainer  = GetTemplateChild(nameof(PART_ContentContainer)) as Panel;
            PART_AnnotationControl = GetTemplateChild(nameof(PART_AnnotationControl)) as AnnotationControl;

            AttachHandlers();

            var wndOp = CreateOpData(WindowOperation.Opened);

            _windowOperationsBus.Publish(wndOp, this);
        }