示例#1
0
 public Control CreateEditor(ReportControlInfo controlInfo, EditorServices services, System.Collections.Generic.IDictionary <string, object> customProperties)
 {
     return(new PictureBoxSizingEditor()
     {
         ViewModel = new PictureBoxSizingEditorViewModel(services, controlInfo, customProperties)
     });
 }
        public PictureBoxSizingEditorViewModel(EditorServices editorServices, ReportControlInfo controlInfo, IDictionary <string, object> customProperties)
        {
            this.editorServices = editorServices;
            applyCommand        = new DelegateCommand <object>(Apply);
            controlName         = controlInfo.DesignName;
            const string customProperyName = "Sizing";

            ImageSizeMode = customProperties.ContainsKey(customProperyName) && customProperties[customProperyName] is ImageSizeMode ?
                            (ImageSizeMode)customProperties[customProperyName] : DevExpress.XtraPrinting.ImageSizeMode.Normal;
        }