Browse Source

Fixed unit tests.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3511 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
6238250a69
  1. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SnaplinePlacementBehavior.cs
  2. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlObject.cs
  3. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/ServiceContainer.cs

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SnaplinePlacementBehavior.cs

@ -139,7 +139,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
void CreateSurface(PlacementOperation operation) void CreateSurface(PlacementOperation operation)
{ {
if (ExtendedItem.Services.DesignPanel != null) { if (ExtendedItem.Services.GetService<IDesignPanel>() != null) {
surface = new Canvas(); surface = new Canvas();
adornerPanel = new AdornerPanel(); adornerPanel = new AdornerPanel();

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlObject.cs

@ -125,7 +125,7 @@ namespace ICSharpCode.WpfDesign.XamlDom
XmlElement newElement = e.OwnerDocument.CreateElement(prefix, e.Name, e.NamespaceURI); XmlElement newElement = e.OwnerDocument.CreateElement(prefix, e.Name, e.NamespaceURI);
foreach (XmlAttribute a in target.Attributes) { foreach (XmlAttribute a in target.Attributes) {
if (a.Prefix == "xmlns") { if (a.Prefix == "xmlns" || a.Name == "xmlns") {
newElement.Attributes.Append(a.Clone() as XmlAttribute); newElement.Attributes.Append(a.Clone() as XmlAttribute);
} }
} }

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/ServiceContainer.cs

@ -56,6 +56,7 @@ namespace ICSharpCode.WpfDesign
/// <summary> /// <summary>
/// Gets the service object of the specified type. /// Gets the service object of the specified type.
/// Returns null when the service is not available.
/// </summary> /// </summary>
public object GetService(Type serviceType) public object GetService(Type serviceType)
{ {
@ -66,6 +67,7 @@ namespace ICSharpCode.WpfDesign
/// <summary> /// <summary>
/// Gets the service object of the type T. /// Gets the service object of the type T.
/// Returns null when the service is not available.
/// </summary> /// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
public T GetService<T>() where T : class public T GetService<T>() where T : class

Loading…
Cancel
Save