Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Replace XmlnsSupportsValidationAttribute (#15855)
Browse files Browse the repository at this point in the history
* Replace XmlnsSupportsValidationAttribute

* Add references

* Remove Microsoft.Windows.Design.Extensibility ref

* Revert "Remove Microsoft.Windows.Design.Extensibility ref"

This reverts commit 5a24df3.

* Testing something out

* Update Xamarin.Forms.Core.Design.csproj

* Update Xamarin.Forms.Core.Design.csproj

* PR Feedback
  • Loading branch information
jfversluis committed Feb 29, 2024
1 parent f065546 commit 7114bf3
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ Visual Studio 2019/**
TestResult.xml
build/packages
WriteDevopsVariables.csproj
!Microsoft.VisualStudio.DesignTools.Extensibility.dll
3 changes: 1 addition & 2 deletions Xamarin.Forms.Core.Design/AttributeTableBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.ComponentModel;
using System.Linq;
using System.Windows.Markup;
using Microsoft.Windows.Design;
using Xamarin.Forms.Internals;

Expand All @@ -13,7 +12,7 @@ public AttributeTableBuilder()
{
// Turn off validation of values, which doesn't work for OnPlatform/OnIdiom
AddCustomAttributes(typeof(AbsoluteLayout).Assembly,
new XmlnsSupportsValidationAttribute("http://xamarin.com/schemas/2014/forms", false));
new Microsoft.VisualStudio.DesignTools.Extensibility.XmlnsSupportsValidationAttribute("http://xamarin.com/schemas/2014/forms", false));

// Style isn't a view, make it visible
AddCallback(typeof(Style), builder => builder.AddCustomAttributes(
Expand Down
6 changes: 6 additions & 0 deletions Xamarin.Forms.Core.Design/Xamarin.Forms.Core.Design.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@
<Compile Include="KeyboardDesignTypeConverter.cs" />
<Compile Include="EasingDesignTypeConverter.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.DesignTools.Extensibility, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Xamarin.Forms.Xaml.Design\Microsoft.VisualStudio.DesignTools.Extensibility.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- Ensure that all images in the 'mac' and 'win' subdirectories are included as embedded resources -->
<!-- using a defined format. That format is "{platform}.{imagename}". We will look up images using -->
Expand Down
3 changes: 1 addition & 2 deletions Xamarin.Forms.Xaml.Design/AttributeTableBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.ComponentModel;
using Microsoft.Windows.Design;

namespace Xamarin.Forms.Xaml.Design
Expand All @@ -9,7 +8,7 @@ class AttributeTableBuilder : Microsoft.Windows.Design.Metadata.AttributeTableBu
public AttributeTableBuilder()
{
AddCustomAttributes(typeof(ArrayExtension).Assembly,
new XmlnsSupportsValidationAttribute("http://xamarin.com/schemas/2014/forms", false));
new Microsoft.VisualStudio.DesignTools.Extensibility.XmlnsSupportsValidationAttribute("http://xamarin.com/schemas/2014/forms", false));

AddCallback(typeof(OnPlatformExtension), builder => builder.AddCustomAttributes(new Attribute[] {
new System.Windows.Markup.MarkupExtensionReturnTypeAttribute (),
Expand Down
Binary file not shown.
6 changes: 6 additions & 0 deletions Xamarin.Forms.Xaml.Design/Xamarin.Forms.Xaml.Design.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,11 @@
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.DesignTools.Extensibility, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\Microsoft.VisualStudio.DesignTools.Extensibility.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

0 comments on commit 7114bf3

Please sign in to comment.