Example #1
0
 static Border GetItemEditor(PropertyEditor editor, string tagValue) {
   Border brd = new Border() {
     Name = Guid.NewGuid().ToString("N"),
     Margin = new Thickness(1, 0, 0, 0),
     BorderThickness = new Thickness(0, 0, 0, 1),
     BorderBrush = new SolidColorBrush(backgroundColor)
   };
   brd.Child = editor;
   brd.Tag = tagValue;
   return brd;
 }
Example #2
0
    private void Editor_GotFocus(object sender, RoutedEventArgs e) {
      if (null != _selectedEditor)
        _selectedEditor.IsSelected = false;
      _selectedEditor = sender as PropertyEditor;
      if (null != _selectedEditor) {
        _selectedEditor.IsSelected = true;

        //double editorX = ((UIElement)selectedEditor.Parent).RenderTransformOrigin.X;
        //Debug.WriteLine("editorX: " + editorX.ToString());
        //double editorY = ((UIElement)selectedEditor.Parent).RenderTransformOrigin.Y;
        //Debug.WriteLine("editorY: " + editorY.ToString());

        //double thisWidth = this.RenderSize.Width;
        //Debug.WriteLine("thisWidth: " + thisWidth.ToString());
        //double thisHeight = this.RenderSize.Height;
        //Debug.WriteLine("thisHeight: " + thisHeight.ToString());

      }
    }
Example #3
0
 private void _doOnCustomEditor(PropertyGridLabel label, PropertyItem item, ref PropertyEditor editor) {
   var eve = this.OnCustomEditor;
   if (eve != null) {
     var args = new OnCustomEditorEventArgs() { Label = label, Editor = editor };
     eve(item, args);
     editor = args.Editor;
   }
 }