Browse Source

Merge branch 'master' into sync-vm-and-datacontext

pull/4917/head
Artyom V. Gorchakov 6 years ago
committed by GitHub
parent
commit
68451e845b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      build/SharedVersion.props
  2. 2
      readme.md
  3. 39
      src/Avalonia.Base/Metadata/XmlnsPrefixAttribute.cs

2
build/SharedVersion.props

@ -20,6 +20,6 @@
</PropertyGroup>
<ItemGroup Label="PackageIcon">
<None Include="$(SolutionDir)/build/Assets/Icon.png" Pack="true" PackagePath=""/>
<None Include="$(MSBuildThisFileDirectory)/Assets/Icon.png" Pack="true" PackagePath=""/>
</ItemGroup>
</Project>

2
readme.md

@ -39,7 +39,7 @@ Examples of UIs built with Avalonia
## JetBrains Rider
If you need to develop Avalonia app with JetBrains Rider, go and *vote* on [this issue](https://youtrack.jetbrains.com/issue/RIDER-39247) in their tracker. JetBrains won't do things without their users telling them that they want the feature, so only **YOU** can make it happen.
If you need to develop Avalonia app with JetBrains Rider you can use latest Rider [preview builds](https://www.jetbrains.com/rider/nextversion/).
## Bleeding Edge Builds

39
src/Avalonia.Base/Metadata/XmlnsPrefixAttribute.cs

@ -0,0 +1,39 @@
using System;
namespace Avalonia.Metadata
{
/// <summary>
/// Use to predefine the prefix associated to an xml namespace in a xaml file
/// </summary>
/// <remarks>
/// example:
/// [assembly: XmlnsPrefix("https://github.com/avaloniaui", "av")]
/// xaml:
/// xmlns:av="https://github.com/avaloniaui"
/// </remarks>
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class XmlnsPrefixAttribute : Attribute
{
/// <summary>
/// Constructor
/// </summary>
/// <param name="xmlNamespace">XML namespce</param>
/// <param name="prefix">recommended prefix</param>
public XmlnsPrefixAttribute(string xmlNamespace, string prefix)
{
XmlNamespace = xmlNamespace ?? throw new ArgumentNullException(nameof(xmlNamespace));
Prefix = prefix ?? throw new ArgumentNullException(nameof(prefix));
}
/// <summary>
/// XML Namespace
/// </summary>
public string XmlNamespace { get; }
/// <summary>
/// New Xml Namespace
/// </summary>
public string Prefix { get; }
}
}
Loading…
Cancel
Save