Browse Source

A few WhiteSpace fixes and Comments removed.

pull/463/head
jkuehner 11 years ago
parent
commit
df4cd4b1c6
  1. 8
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/RotateThumb.cs
  2. 40
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/SizeDisplay.cs
  3. 74
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/Initializers.cs
  4. 50
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Services.cs

8
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/RotateThumb.cs

@ -32,14 +32,6 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
{ {
public class RotateThumb : ResizeThumb public class RotateThumb : ResizeThumb
{ {
// private double initialAngle;
// private RotateTransform rotateTransform;
// private Vector startVector;
// private Point centerPoint;
// private Control designerItem;
// private Panel canvas;
// private AdornerPanel parent;
static RotateThumb() static RotateThumb()
{ {
DefaultStyleKeyProperty.OverrideMetadata(typeof(RotateThumb), new FrameworkPropertyMetadata(typeof(RotateThumb))); DefaultStyleKeyProperty.OverrideMetadata(typeof(RotateThumb), new FrameworkPropertyMetadata(typeof(RotateThumb)));

40
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/SizeDisplay.cs

@ -26,25 +26,25 @@ using System.Windows.Controls;
namespace ICSharpCode.WpfDesign.Designer.Controls namespace ICSharpCode.WpfDesign.Designer.Controls
{ {
/// <summary> /// <summary>
/// Display height of the element. /// Display height of the element.
/// </summary> /// </summary>
class HeightDisplay : Control class HeightDisplay : Control
{ {
static HeightDisplay() static HeightDisplay()
{ {
DefaultStyleKeyProperty.OverrideMetadata(typeof(HeightDisplay), new FrameworkPropertyMetadata(typeof(HeightDisplay))); DefaultStyleKeyProperty.OverrideMetadata(typeof(HeightDisplay), new FrameworkPropertyMetadata(typeof(HeightDisplay)));
} }
} }
/// <summary> /// <summary>
/// Display width of the element. /// Display width of the element.
/// </summary> /// </summary>
class WidthDisplay : Control class WidthDisplay : Control
{ {
static WidthDisplay() static WidthDisplay()
{ {
DefaultStyleKeyProperty.OverrideMetadata(typeof(WidthDisplay), new FrameworkPropertyMetadata(typeof(WidthDisplay))); DefaultStyleKeyProperty.OverrideMetadata(typeof(WidthDisplay), new FrameworkPropertyMetadata(typeof(WidthDisplay)));
} }
} }
} }

74
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/Initializers.cs

@ -30,55 +30,55 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions.Initializers
{ {
public override void InitializeDefaults(DesignItem item) public override void InitializeDefaults(DesignItem item)
{ {
//Not every Content Control can have a text as Content (e.g. ZoomBox of WPF Toolkit) //Not every Content Control can have a text as Content (e.g. ZoomBox of WPF Toolkit)
if (item.Component is Button) if (item.Component is Button)
{ {
DesignItemProperty contentProperty = item.Properties["Content"]; DesignItemProperty contentProperty = item.Properties["Content"];
if (contentProperty.ValueOnInstance == null) if (contentProperty.ValueOnInstance == null)
{ {
contentProperty.SetValue(item.ComponentType.Name); contentProperty.SetValue(item.ComponentType.Name);
} }
} }
DesignItemProperty verticalAlignmentProperty = item.Properties["VerticalAlignment"]; DesignItemProperty verticalAlignmentProperty = item.Properties["VerticalAlignment"];
if (verticalAlignmentProperty.ValueOnInstance == null) if (verticalAlignmentProperty.ValueOnInstance == null)
{ {
verticalAlignmentProperty.SetValue(VerticalAlignment.Center); verticalAlignmentProperty.SetValue(VerticalAlignment.Center);
} }
DesignItemProperty horizontalAlignmentProperty = item.Properties["HorizontalAlignment"]; DesignItemProperty horizontalAlignmentProperty = item.Properties["HorizontalAlignment"];
if (horizontalAlignmentProperty.ValueOnInstance == null) if (horizontalAlignmentProperty.ValueOnInstance == null)
{ {
horizontalAlignmentProperty.SetValue(HorizontalAlignment.Center); horizontalAlignmentProperty.SetValue(HorizontalAlignment.Center);
} }
} }
} }
[ExtensionFor(typeof(TextBlock))] [ExtensionFor(typeof(TextBlock))]
public class TextBlockInitializer : DefaultInitializer public class TextBlockInitializer : DefaultInitializer
{ {
public override void InitializeDefaults(DesignItem item) public override void InitializeDefaults(DesignItem item)
{ {
DesignItemProperty textProperty = item.Properties["Text"]; DesignItemProperty textProperty = item.Properties["Text"];
if (textProperty.ValueOnInstance == null || textProperty.ValueOnInstance.ToString() == "") if (textProperty.ValueOnInstance == null || textProperty.ValueOnInstance.ToString() == "")
{ {
textProperty.SetValue(item.ComponentType.Name); textProperty.SetValue(item.ComponentType.Name);
} }
DesignItemProperty verticalAlignmentProperty = item.Properties["VerticalAlignment"]; DesignItemProperty verticalAlignmentProperty = item.Properties["VerticalAlignment"];
if (verticalAlignmentProperty.ValueOnInstance == null) if (verticalAlignmentProperty.ValueOnInstance == null)
{ {
verticalAlignmentProperty.SetValue(VerticalAlignment.Center); verticalAlignmentProperty.SetValue(VerticalAlignment.Center);
} }
DesignItemProperty horizontalAlignmentProperty = item.Properties["HorizontalAlignment"]; DesignItemProperty horizontalAlignmentProperty = item.Properties["HorizontalAlignment"];
if (horizontalAlignmentProperty.ValueOnInstance == null) if (horizontalAlignmentProperty.ValueOnInstance == null)
{ {
horizontalAlignmentProperty.SetValue(HorizontalAlignment.Center); horizontalAlignmentProperty.SetValue(HorizontalAlignment.Center);
} }
} }
} }
[ExtensionFor(typeof(HeaderedContentControl), OverrideExtension = typeof(ContentControlInitializer))] [ExtensionFor(typeof(HeaderedContentControl), OverrideExtension = typeof(ContentControlInitializer))]
public class HeaderedContentControlInitializer : DefaultInitializer public class HeaderedContentControlInitializer : DefaultInitializer
{ {
@ -96,7 +96,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions.Initializers
} }
} }
[ExtensionFor(typeof(Shape))] [ExtensionFor(typeof(Shape))]
public class ShapeInitializer : DefaultInitializer public class ShapeInitializer : DefaultInitializer
{ {
public override void InitializeDefaults(DesignItem item) public override void InitializeDefaults(DesignItem item)

50
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Services.cs

@ -233,33 +233,33 @@ namespace ICSharpCode.WpfDesign
#region IKeyBindingService #region IKeyBindingService
/// <summary> /// <summary>
/// Service that handles all the key bindings in the designer. /// Service that handles all the key bindings in the designer.
/// </summary> /// </summary>
public interface IKeyBindingService public interface IKeyBindingService
{ {
/// <summary> /// <summary>
/// Gets the object to which the bindings are being applied /// Gets the object to which the bindings are being applied
/// </summary> /// </summary>
object Owner { get; } object Owner { get; }
/// <summary> /// <summary>
/// Register <paramref name="binding"/> with <see cref="Owner"/>. /// Register <paramref name="binding"/> with <see cref="Owner"/>.
/// </summary> /// </summary>
/// <param name="binding">The binding to be applied.</param> /// <param name="binding">The binding to be applied.</param>
void RegisterBinding(KeyBinding binding); void RegisterBinding(KeyBinding binding);
/// <summary> /// <summary>
/// De-register <paramref name="binding"/> with <see cref="Owner"/>. /// De-register <paramref name="binding"/> with <see cref="Owner"/>.
/// </summary> /// </summary>
/// <param name="binding">The binding to be applied.</param> /// <param name="binding">The binding to be applied.</param>
void DeregisterBinding(KeyBinding binding); void DeregisterBinding(KeyBinding binding);
/// <summary> /// <summary>
/// Gets binding for the corresponding gesture otherwise returns null. /// Gets binding for the corresponding gesture otherwise returns null.
/// </summary> /// </summary>
/// <param name="gesture">The keyboard gesture requested.</param> /// <param name="gesture">The keyboard gesture requested.</param>
KeyBinding GetBinding(KeyGesture gesture); KeyBinding GetBinding(KeyGesture gesture);
} }
#endregion #endregion
} }

Loading…
Cancel
Save