/// <summary>
        /// Forces a reload of the image's properties. This is useful for refreshing the form when the image
        /// properties have been changed externally.
        /// </summary>
        private void RefreshImage()
        {
            // update selected image (null if none is selected)
            _selectedImage = _editorContext.SelectedImage;

            // refresh the view
            if (SelectionIsImage)
            {
                ImagePropertyHandler.RefreshView();
            }
        }
        public void UpdateInlineImageSize(Size newSize, ImageDecoratorInvocationSource invocationSource)
        {
            if (!Visible)
            {
                //refresh the ImagePropertiesInfo object since it doesn't get refreshed automatically when
                //the form is hidden.
                ImagePropertyHandler.RefreshView();
            }

            ImagePropertiesInfo.InlineImageSize = newSize;
            ImagePropertyChanged(this, new ImagePropertyEvent(ImagePropertyType.InlineSize, ImagePropertiesInfo, invocationSource));
            RefreshImage();
        }
예제 #3
0
        /// <summary>
        /// Forces an update of the picture commands by recreating the ImagePropertiesInfo object.
        /// </summary>
        public void UpdateView(object htmlSelection)
        {
            if (htmlSelection != null)
            {
                // Image selected.
                HookAlignmentMarginCommands();
            }
            else
            {
                // No image selected.
                UnhookAlignmentMarginCommands();
            }

            ImagePropertyHandler.RefreshView();
        }
 protected override void OnBeforeShow()
 {
     base.OnBeforeShow();
     ImagePropertyHandler.RefreshView();
 }