コード例 #1
0
        private void Editor_GotFocus(object sender, RoutedEventArgs e)
        {
            if (null != selectedEditor)
                selectedEditor.IsSelected = false;
            selectedEditor = sender as ValueEditorBase;
            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());

            }
        }
コード例 #2
0
 static Border GetItemEditor(ValueEditorBase 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;
 }