зеркало из https://github.com/DeGsoft/maui-linux.git
Merge branch '3.0.0'
This commit is contained in:
Коммит
1df63c27b9
|
@ -15,7 +15,7 @@
|
|||
<AndroidApplication>True</AndroidApplication>
|
||||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
|
||||
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
|
||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<NuGetPackageImportStamp>
|
||||
|
|
|
@ -30,5 +30,7 @@
|
|||
<ProjectReference Include="..\..\Xamarin.Forms.Platform\Xamarin.Forms.Platform.csproj" />
|
||||
<ProjectReference Include="..\..\Xamarin.Forms.Xaml\Xamarin.Forms.Xaml.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\..\.nuspec\Xamarin.Forms.targets" />
|
||||
</Project>
|
||||
|
||||
<Import Project="..\..\.nuspec\Xamarin.Forms.targets" Condition="Exists('..\..\.nuspec\Xamarin.Forms.Build.Tasks.dll')" />
|
||||
|
||||
</Project>
|
|
@ -16,7 +16,7 @@
|
|||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
|
||||
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
|
||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis>
|
||||
<AndroidStoreUncompressedFileExtensions />
|
||||
|
@ -205,7 +205,6 @@
|
|||
<AndroidResource Include="Resources\values\styles.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
<Import Project="..\..\.nuspec\Xamarin.Forms.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
|
|
|
@ -164,7 +164,6 @@
|
|||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<Import Project="..\..\.nuspec\Xamarin.Forms.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
|
|
@ -157,7 +157,6 @@
|
|||
<Reference Include="Xamarin.iOS" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
<Import Project="..\..\.nuspec\Xamarin.Forms.targets" />
|
||||
<Import Project="..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -28,5 +28,5 @@
|
|||
<ProjectReference Include="..\..\Xamarin.Forms.Xaml\Xamarin.Forms.Xaml.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="..\..\.nuspec\Xamarin.Forms.targets" />
|
||||
<Import Project="..\..\.nuspec\Xamarin.Forms.targets" Condition="Exists('..\..\.nuspec\Xamarin.Forms.Build.Tasks.dll')" />
|
||||
</Project>
|
|
@ -14,7 +14,7 @@
|
|||
<FileAlignment>512</FileAlignment>
|
||||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
|
||||
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
|
||||
<DevInstrumentationEnabled>True</DevInstrumentationEnabled>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
||||
<RestorePackages>true</RestorePackages>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using Mono.Cecil;
|
||||
using Mono.Cecil.Cil;
|
||||
|
||||
|
@ -32,27 +33,23 @@ namespace Xamarin.Forms.Core.XamlC
|
|||
var parts = value.Split('.');
|
||||
if (parts.Length == 1) {
|
||||
var parent = node.Parent?.Parent as IElementNode ?? (node.Parent?.Parent as IListNode)?.Parent as IElementNode;
|
||||
|
||||
if ((node.Parent as ElementNode)?.XmlType.NamespaceUri == XamlParser.XFUri &&
|
||||
((node.Parent as ElementNode)?.XmlType.Name == "Setter" || (node.Parent as ElementNode)?.XmlType.Name == "PropertyCondition")) {
|
||||
if ( (node.Parent as ElementNode)?.XmlType.NamespaceUri == XamlParser.XFUri
|
||||
&& ( (node.Parent as ElementNode)?.XmlType.Name == nameof(Setter)
|
||||
|| (node.Parent as ElementNode)?.XmlType.Name == nameof(PropertyCondition))) {
|
||||
if (parent.XmlType.NamespaceUri == XamlParser.XFUri &&
|
||||
(parent.XmlType.Name == "Trigger" || parent.XmlType.Name == "DataTrigger" || parent.XmlType.Name == "MultiTrigger" || parent.XmlType.Name == "Style")) {
|
||||
( parent.XmlType.Name == nameof(Trigger)
|
||||
|| parent.XmlType.Name == nameof(DataTrigger)
|
||||
|| parent.XmlType.Name == nameof(MultiTrigger)
|
||||
|| parent.XmlType.Name == nameof(Style))) {
|
||||
var ttnode = (parent as ElementNode).Properties [new XmlName("", "TargetType")];
|
||||
if (ttnode is ValueNode)
|
||||
typeName = (ttnode as ValueNode).Value as string;
|
||||
else if (ttnode is IElementNode)
|
||||
typeName = ((ttnode as IElementNode).CollectionItems.FirstOrDefault() as ValueNode)?.Value as string ?? ((ttnode as IElementNode).Properties [new XmlName("", "TypeName")] as ValueNode)?.Value as string;
|
||||
} else if (parent.XmlType.NamespaceUri == XamlParser.XFUri && parent.XmlType.Name == "VisualState") {
|
||||
var current = parent.Parent.Parent.Parent as IElementNode;
|
||||
if (current.XmlType.NamespaceUri == XamlParser.XFUri && current.XmlType.Name == "Setter") {
|
||||
// Parent will be a Style, and the type will be that Style's TargetType
|
||||
typeName =
|
||||
((current?.Parent as IElementNode)?.Properties[new XmlName("", "TargetType")] as ValueNode)?.Value as string;
|
||||
} else {
|
||||
typeName = current.XmlType.Name;
|
||||
}
|
||||
} else if (parent.XmlType.NamespaceUri == XamlParser.XFUri && parent.XmlType.Name == nameof(VisualState)) {
|
||||
typeName = FindTypeNameForVisualState(parent, node);
|
||||
}
|
||||
} else if ((node.Parent as ElementNode)?.XmlType.NamespaceUri == XamlParser.XFUri && (node.Parent as ElementNode)?.XmlType.Name == "Trigger")
|
||||
} else if ((node.Parent as ElementNode)?.XmlType.NamespaceUri == XamlParser.XFUri && (node.Parent as ElementNode)?.XmlType.Name == nameof(Trigger))
|
||||
typeName = ((node.Parent as ElementNode).Properties [new XmlName("", "TargetType")] as ValueNode).Value as string;
|
||||
propertyName = parts [0];
|
||||
} else if (parts.Length == 2) {
|
||||
|
@ -73,6 +70,29 @@ namespace Xamarin.Forms.Core.XamlC
|
|||
return bpRef;
|
||||
}
|
||||
|
||||
static string FindTypeNameForVisualState(IElementNode parent, IXmlLineInfo lineInfo)
|
||||
{
|
||||
//1. parent is VisualState, don't check that
|
||||
|
||||
//2. check that the VS is in a VSG
|
||||
if (!(parent.Parent is IElementNode target) || target.XmlType.NamespaceUri != XamlParser.XFUri || target.XmlType.Name != nameof(VisualStateGroup))
|
||||
throw new XamlParseException($"Expected {nameof(VisualStateGroup)} but found {parent.Parent}", lineInfo);
|
||||
|
||||
//3. if the VSG is in a VSGL, skip that as it could be implicit
|
||||
if ( target.Parent is ListNode
|
||||
|| ( (target.Parent as IElementNode)?.XmlType.NamespaceUri == XamlParser.XFUri
|
||||
&& (target.Parent as IElementNode)?.XmlType.Name == nameof(VisualStateGroupList)))
|
||||
target = target.Parent.Parent as IElementNode;
|
||||
else
|
||||
target = target.Parent as IElementNode;
|
||||
|
||||
//4. target is now a Setter in a Style, or a VE
|
||||
if (target.XmlType.NamespaceUri == XamlParser.XFUri && target.XmlType.Name == nameof(Setter))
|
||||
return ((target?.Parent as IElementNode)?.Properties[new XmlName("", "TargetType")] as ValueNode)?.Value as string;
|
||||
else
|
||||
return target.XmlType.Name;
|
||||
}
|
||||
|
||||
public static FieldReference GetBindablePropertyFieldReference(TypeReference typeRef, string propertyName, ModuleDefinition module)
|
||||
{
|
||||
TypeReference declaringTypeReference;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<AndroidStoreUncompressedFileExtensions />
|
||||
<MandroidI18n />
|
||||
<JavaOptions />
|
||||
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
|
||||
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
<RestorePackages>true</RestorePackages>
|
||||
<NuGetPackageImportStamp>
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
<ProjectReference Include="..\Xamarin.Forms.Maps\Xamarin.Forms.Maps.csproj" />
|
||||
<ProjectReference Include="..\Xamarin.Forms.Xaml\Xamarin.Forms.Xaml.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="..\.nuspec\Xamarin.Forms.targets" />
|
||||
|
||||
<Import Project="..\.nuspec\Xamarin.Forms.targets" Condition="Exists('..\.nuspec\Xamarin.Forms.Build.Tasks.dll')" />
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="BuildNumber.txt" />
|
||||
|
|
|
@ -922,7 +922,7 @@ namespace Xamarin.Forms.Core.UnitTests
|
|||
}
|
||||
|
||||
[Test]
|
||||
public void IsSetIsFalseWhenPropSetByDefaultValueCreator()
|
||||
public void IsSetIsTrueWhenPropSetByDefaultValueCreator()
|
||||
{
|
||||
string defaultValue = "default";
|
||||
string defaultValueC = "defaultVC";
|
||||
|
@ -939,7 +939,7 @@ namespace Xamarin.Forms.Core.UnitTests
|
|||
Assert.AreEqual(defaultValueC, created);
|
||||
|
||||
var isSet = bindable.IsSet(bindableProperty);
|
||||
Assert.IsFalse(isSet);
|
||||
Assert.IsTrue(isSet);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -1509,6 +1509,19 @@ namespace Xamarin.Forms.Core.UnitTests
|
|||
Assert.IsTrue(locator.Count == 1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
//https://github.com/xamarin/Xamarin.Forms/issues/2019
|
||||
public void EventSubscribingOnBindingContextChanged()
|
||||
{
|
||||
var source = new MockBindable();
|
||||
var bindable = new MockBindable();
|
||||
var property = BindableProperty.Create("foo", typeof(string), typeof(MockBindable), null);
|
||||
bindable.SetBinding(property, new Binding("BindingContext", source: source));
|
||||
Assert.That((string)bindable.GetValue(property), Is.EqualTo(null));
|
||||
BindableObject.SetInheritedBindingContext(source, "bar"); //inherited BC, only trigger BCChanged
|
||||
Assert.That((string)bindable.GetValue(property), Is.EqualTo("bar"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void BindingsEditableAfterUnapplied()
|
||||
{
|
||||
|
|
|
@ -287,12 +287,10 @@ namespace Xamarin.Forms
|
|||
if (binding == null)
|
||||
throw new ArgumentNullException("binding");
|
||||
|
||||
BindablePropertyContext context = null;
|
||||
if (fromStyle && (context = GetContext(targetProperty)) != null && (context.Attributes & BindableContextAttributes.IsDefaultValue) == 0 &&
|
||||
(context.Attributes & BindableContextAttributes.IsSetFromStyle) == 0)
|
||||
if (fromStyle && !CanBeSetFromStyle(targetProperty))
|
||||
return;
|
||||
|
||||
context = context ?? GetOrCreateContext(targetProperty);
|
||||
var context = GetOrCreateContext(targetProperty);
|
||||
if (fromStyle)
|
||||
context.Attributes |= BindableContextAttributes.IsSetFromStyle;
|
||||
else
|
||||
|
@ -309,6 +307,20 @@ namespace Xamarin.Forms
|
|||
binding.Apply(BindingContext, this, targetProperty);
|
||||
}
|
||||
|
||||
bool CanBeSetFromStyle(BindableProperty property)
|
||||
{
|
||||
var context = GetContext(property);
|
||||
if (context == null)
|
||||
return true;
|
||||
if ((context.Attributes & BindableContextAttributes.IsSetFromStyle) == BindableContextAttributes.IsSetFromStyle)
|
||||
return true;
|
||||
if ((context.Attributes & BindableContextAttributes.IsDefaultValue) == BindableContextAttributes.IsDefaultValue)
|
||||
return true;
|
||||
if ((context.Attributes & BindableContextAttributes.IsDefaultValueCreated) == BindableContextAttributes.IsDefaultValueCreated)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
internal void SetDynamicResource(BindableProperty property, string key)
|
||||
{
|
||||
SetDynamicResource(property, key, false);
|
||||
|
@ -320,13 +332,10 @@ namespace Xamarin.Forms
|
|||
throw new ArgumentNullException(nameof(property));
|
||||
if (string.IsNullOrEmpty(key))
|
||||
throw new ArgumentNullException(nameof(key));
|
||||
|
||||
BindablePropertyContext context = null;
|
||||
if (fromStyle && (context = GetContext(property)) != null && (context.Attributes & BindableContextAttributes.IsDefaultValue) == 0 &&
|
||||
(context.Attributes & BindableContextAttributes.IsSetFromStyle) == 0)
|
||||
if (fromStyle && !CanBeSetFromStyle(property))
|
||||
return;
|
||||
|
||||
context = context ?? GetOrCreateContext(property);
|
||||
var context = GetOrCreateContext(property);
|
||||
|
||||
context.Attributes |= BindableContextAttributes.IsDynamicResource;
|
||||
if (fromStyle)
|
||||
|
@ -471,9 +480,7 @@ namespace Xamarin.Forms
|
|||
if (bpcontext == null)
|
||||
return;
|
||||
|
||||
if ( fromStyle && bpcontext != null
|
||||
&& (bpcontext.Attributes & BindableContextAttributes.IsDefaultValue) != 0
|
||||
&& (bpcontext.Attributes & BindableContextAttributes.IsSetFromStyle) == 0)
|
||||
if (fromStyle && !CanBeSetFromStyle(property))
|
||||
return;
|
||||
|
||||
object original = bpcontext.Value;
|
||||
|
@ -490,7 +497,10 @@ namespace Xamarin.Forms
|
|||
|
||||
bpcontext.Attributes &= ~BindableContextAttributes.IsManuallySet;
|
||||
bpcontext.Value = newValue;
|
||||
bpcontext.Attributes |= BindableContextAttributes.IsDefaultValue;
|
||||
if (property.DefaultValueCreator == null)
|
||||
bpcontext.Attributes |= BindableContextAttributes.IsDefaultValue;
|
||||
else
|
||||
bpcontext.Attributes |= BindableContextAttributes.IsDefaultValueCreated;
|
||||
|
||||
if (!same)
|
||||
{
|
||||
|
@ -504,8 +514,10 @@ namespace Xamarin.Forms
|
|||
{
|
||||
var context = new BindablePropertyContext { Property = property, Value = property.DefaultValueCreator != null ? property.DefaultValueCreator(this) : property.DefaultValue };
|
||||
|
||||
if (property.DefaultValueCreator != null)
|
||||
if (property.DefaultValueCreator == null)
|
||||
context.Attributes = BindableContextAttributes.IsDefaultValue;
|
||||
else
|
||||
context.Attributes = BindableContextAttributes.IsDefaultValueCreated;
|
||||
|
||||
_properties.Add(context);
|
||||
return context;
|
||||
|
@ -555,9 +567,7 @@ namespace Xamarin.Forms
|
|||
if (checkAccess && property.IsReadOnly)
|
||||
throw new InvalidOperationException(string.Format("The BindableProperty \"{0}\" is readonly.", property.PropertyName));
|
||||
|
||||
BindablePropertyContext context = null;
|
||||
if (fromStyle && (context = GetContext(property)) != null && (context.Attributes & BindableContextAttributes.IsDefaultValue) == 0 &&
|
||||
(context.Attributes & BindableContextAttributes.IsSetFromStyle) == 0)
|
||||
if (fromStyle && !CanBeSetFromStyle(property))
|
||||
return;
|
||||
|
||||
SetValueCore(property, value, SetValueFlags.ClearOneWayBindings | SetValueFlags.ClearDynamicResource,
|
||||
|
@ -586,6 +596,7 @@ namespace Xamarin.Forms
|
|||
}
|
||||
|
||||
context.Attributes &= ~BindableContextAttributes.IsDefaultValue;
|
||||
context.Attributes &= ~BindableContextAttributes.IsDefaultValueCreated;
|
||||
|
||||
if ((context.Attributes & BindableContextAttributes.IsDynamicResource) != 0 && clearDynamicResources)
|
||||
RemoveDynamicResource(property);
|
||||
|
@ -622,7 +633,8 @@ namespace Xamarin.Forms
|
|||
IsBeingSet = 1 << 1,
|
||||
IsDynamicResource = 1 << 2,
|
||||
IsSetFromStyle = 1 << 3,
|
||||
IsDefaultValue = 1 << 4
|
||||
IsDefaultValue = 1 << 4,
|
||||
IsDefaultValueCreated = 1 << 5,
|
||||
}
|
||||
|
||||
class BindablePropertyContext
|
||||
|
|
|
@ -146,9 +146,7 @@ namespace Xamarin.Forms
|
|||
{
|
||||
var inpc = current as INotifyPropertyChanged;
|
||||
if (inpc != null && !ReferenceEquals(current, previous))
|
||||
{
|
||||
part.Subscribe(inpc);
|
||||
}
|
||||
}
|
||||
|
||||
previous = current;
|
||||
|
@ -460,11 +458,13 @@ namespace Xamarin.Forms
|
|||
readonly WeakReference<INotifyPropertyChanged> _source = new WeakReference<INotifyPropertyChanged>(null);
|
||||
readonly WeakReference<PropertyChangedEventHandler> _listener = new WeakReference<PropertyChangedEventHandler>(null);
|
||||
readonly PropertyChangedEventHandler _handler;
|
||||
readonly EventHandler _bchandler;
|
||||
internal WeakReference<INotifyPropertyChanged> Source => _source;
|
||||
|
||||
public WeakPropertyChangedProxy()
|
||||
{
|
||||
_handler = new PropertyChangedEventHandler(OnPropertyChanged);
|
||||
_bchandler = new EventHandler(OnBCChanged);
|
||||
}
|
||||
|
||||
public WeakPropertyChangedProxy(INotifyPropertyChanged source, PropertyChangedEventHandler listener) : this()
|
||||
|
@ -475,6 +475,9 @@ namespace Xamarin.Forms
|
|||
public void SubscribeTo(INotifyPropertyChanged source, PropertyChangedEventHandler listener)
|
||||
{
|
||||
source.PropertyChanged += _handler;
|
||||
var bo = source as BindableObject;
|
||||
if (bo != null)
|
||||
bo.BindingContextChanged += _bchandler;
|
||||
_source.SetTarget(source);
|
||||
_listener.SetTarget(listener);
|
||||
}
|
||||
|
@ -484,6 +487,10 @@ namespace Xamarin.Forms
|
|||
INotifyPropertyChanged source;
|
||||
if (_source.TryGetTarget(out source) && source != null)
|
||||
source.PropertyChanged -= _handler;
|
||||
var bo = source as BindableObject;
|
||||
if (bo != null)
|
||||
bo.BindingContextChanged -= _bchandler;
|
||||
|
||||
_source.SetTarget(null);
|
||||
_listener.SetTarget(null);
|
||||
}
|
||||
|
@ -496,6 +503,11 @@ namespace Xamarin.Forms
|
|||
else
|
||||
Unsubscribe();
|
||||
}
|
||||
|
||||
void OnBCChanged(object sender, EventArgs e)
|
||||
{
|
||||
OnPropertyChanged(sender, new PropertyChangedEventArgs("BindingContext"));
|
||||
}
|
||||
}
|
||||
|
||||
class BindingExpressionPart
|
||||
|
@ -518,10 +530,8 @@ namespace Xamarin.Forms
|
|||
{
|
||||
INotifyPropertyChanged source;
|
||||
if (_listener != null && _listener.Source.TryGetTarget(out source) && ReferenceEquals(handler, source))
|
||||
{
|
||||
// Already subscribed
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear out the old subscription if necessary
|
||||
Unsubscribe();
|
||||
|
@ -616,4 +626,4 @@ namespace Xamarin.Forms
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<FileAlignment>512</FileAlignment>
|
||||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
|
||||
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
|
||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
<RestorePackages>true</RestorePackages>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
|
||||
<AndroidResgenClass>Resource</AndroidResgenClass>
|
||||
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
|
||||
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
|
||||
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
|
||||
<AssemblyName>Xamarin.Forms.Platform.Android.AppLinks</AssemblyName>
|
||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||
<NuGetPackageImportStamp>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<RootNamespace>FormsViewGroup</RootNamespace>
|
||||
<AssemblyName>FormsViewGroup</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
|
||||
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
|
||||
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
|
||||
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
<RestorePackages>true</RestorePackages>
|
||||
<NuGetPackageImportStamp>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Xamarin.Forms.Xaml.UnitTests.Gh2034">
|
||||
<FlexLayout StyleClass="login-form">
|
||||
<Label >
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="StrengthStates">
|
||||
|
||||
<VisualState x:Name="VeryWeak">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="Text" Value="foo"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Label>
|
||||
</FlexLayout>
|
||||
</ContentPage>
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Xamarin.Forms.Xaml.UnitTests
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Skip)]
|
||||
public partial class Gh2034 : ContentPage
|
||||
{
|
||||
public Gh2034()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public Gh2034(bool useCompiledXaml)
|
||||
{
|
||||
//this stub will be replaced at compile time
|
||||
}
|
||||
|
||||
[TestFixture]
|
||||
class Tests
|
||||
{
|
||||
[TestCase(true)]
|
||||
public void Compiles(bool useCompiledXaml)
|
||||
{
|
||||
if (!useCompiledXaml)
|
||||
return;
|
||||
MockCompiler.Compile(typeof(Gh2034));
|
||||
Assert.Pass();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -579,9 +579,14 @@
|
|||
<Compile Include="Issues\Gh1978.xaml.cs">
|
||||
<DependentUpon>Gh1978.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Issues\Gh2034.xaml.cs">
|
||||
<DependentUpon>Gh2034.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\.nuspec\Xamarin.Forms.Debug.targets" />
|
||||
|
||||
<Import Project="..\.nuspec\Xamarin.Forms.Debug.targets" Condition="Exists('..\.nuspec\Xamarin.Forms.Build.Tasks.dll')" />
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Xamarin.Forms.Core\Xamarin.Forms.Core.csproj">
|
||||
<Project>{57B8B73D-C3B5-4C42-869E-7B2F17D354AC}</Project>
|
||||
|
@ -1036,6 +1041,10 @@
|
|||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Issues\Gh2034.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче