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 @@ -32,14 +32,6 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
{
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()
{
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; @@ -26,25 +26,25 @@ using System.Windows.Controls;
namespace ICSharpCode.WpfDesign.Designer.Controls
{
/// <summary>
/// Display height of the element.
/// </summary>
class HeightDisplay : Control
{
static HeightDisplay()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(HeightDisplay), new FrameworkPropertyMetadata(typeof(HeightDisplay)));
}
}
/// <summary>
/// Display height of the element.
/// </summary>
class HeightDisplay : Control
{
static HeightDisplay()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(HeightDisplay), new FrameworkPropertyMetadata(typeof(HeightDisplay)));
}
}
/// <summary>
/// Display width of the element.
/// </summary>
class WidthDisplay : Control
{
static WidthDisplay()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(WidthDisplay), new FrameworkPropertyMetadata(typeof(WidthDisplay)));
}
}
/// <summary>
/// Display width of the element.
/// </summary>
class WidthDisplay : Control
{
static 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 @@ -30,55 +30,55 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions.Initializers
{
public override void InitializeDefaults(DesignItem item)
{
//Not every Content Control can have a text as Content (e.g. ZoomBox of WPF Toolkit)
if (item.Component is Button)
{
//Not every Content Control can have a text as Content (e.g. ZoomBox of WPF Toolkit)
if (item.Component is Button)
{
DesignItemProperty contentProperty = item.Properties["Content"];
if (contentProperty.ValueOnInstance == null)
{
if (contentProperty.ValueOnInstance == null)
{
contentProperty.SetValue(item.ComponentType.Name);
}
}
DesignItemProperty verticalAlignmentProperty = item.Properties["VerticalAlignment"];
if (verticalAlignmentProperty.ValueOnInstance == null)
{
verticalAlignmentProperty.SetValue(VerticalAlignment.Center);
}
DesignItemProperty verticalAlignmentProperty = item.Properties["VerticalAlignment"];
if (verticalAlignmentProperty.ValueOnInstance == null)
{
verticalAlignmentProperty.SetValue(VerticalAlignment.Center);
}
DesignItemProperty horizontalAlignmentProperty = item.Properties["HorizontalAlignment"];
if (horizontalAlignmentProperty.ValueOnInstance == null)
{
horizontalAlignmentProperty.SetValue(HorizontalAlignment.Center);
}
DesignItemProperty horizontalAlignmentProperty = item.Properties["HorizontalAlignment"];
if (horizontalAlignmentProperty.ValueOnInstance == null)
{
horizontalAlignmentProperty.SetValue(HorizontalAlignment.Center);
}
}
}
[ExtensionFor(typeof(TextBlock))]
public class TextBlockInitializer : DefaultInitializer
{
public override void InitializeDefaults(DesignItem item)
{
DesignItemProperty textProperty = item.Properties["Text"];
if (textProperty.ValueOnInstance == null || textProperty.ValueOnInstance.ToString() == "")
{
textProperty.SetValue(item.ComponentType.Name);
}
public class TextBlockInitializer : DefaultInitializer
{
public override void InitializeDefaults(DesignItem item)
{
DesignItemProperty textProperty = item.Properties["Text"];
if (textProperty.ValueOnInstance == null || textProperty.ValueOnInstance.ToString() == "")
{
textProperty.SetValue(item.ComponentType.Name);
}
DesignItemProperty verticalAlignmentProperty = item.Properties["VerticalAlignment"];
if (verticalAlignmentProperty.ValueOnInstance == null)
{
verticalAlignmentProperty.SetValue(VerticalAlignment.Center);
}
DesignItemProperty verticalAlignmentProperty = item.Properties["VerticalAlignment"];
if (verticalAlignmentProperty.ValueOnInstance == null)
{
verticalAlignmentProperty.SetValue(VerticalAlignment.Center);
}
DesignItemProperty horizontalAlignmentProperty = item.Properties["HorizontalAlignment"];
if (horizontalAlignmentProperty.ValueOnInstance == null)
{
horizontalAlignmentProperty.SetValue(HorizontalAlignment.Center);
}
}
DesignItemProperty horizontalAlignmentProperty = item.Properties["HorizontalAlignment"];
if (horizontalAlignmentProperty.ValueOnInstance == null)
{
horizontalAlignmentProperty.SetValue(HorizontalAlignment.Center);
}
}
}
[ExtensionFor(typeof(HeaderedContentControl), OverrideExtension = typeof(ContentControlInitializer))]
public class HeaderedContentControlInitializer : DefaultInitializer
{
@ -96,7 +96,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions.Initializers @@ -96,7 +96,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions.Initializers
}
}
[ExtensionFor(typeof(Shape))]
[ExtensionFor(typeof(Shape))]
public class ShapeInitializer : DefaultInitializer
{
public override void InitializeDefaults(DesignItem item)

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

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

Loading…
Cancel
Save