зеркало из https://github.com/AvaloniaUI/OmniXAML.git
Some attributes are now ignored (like Ignorable).
This commit is contained in:
Родитель
02dbb08aed
Коммит
09196d2e1d
|
@ -3,6 +3,7 @@ namespace OmniXaml.Wpf
|
|||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Media;
|
||||
using Builder;
|
||||
using Typing;
|
||||
|
||||
|
@ -12,7 +13,7 @@ namespace OmniXaml.Wpf
|
|||
|
||||
public WpfCleanWiringContextBuilder()
|
||||
{
|
||||
var xamlNamespaceRegistry = CreateXamlNamespaceRegistry();
|
||||
var xamlNamespaceRegistry = CreateXamlNamespaceRegistry();
|
||||
TypeContext = new TypeContext(new WpfXamlTypeRepository(xamlNamespaceRegistry), xamlNamespaceRegistry, new TypeFactory());
|
||||
ContentPropertyProvider = new WpfContentPropertyProvider();
|
||||
TypeConverterProvider = new WpfTypeConverterProvider();
|
||||
|
@ -22,16 +23,20 @@ namespace OmniXaml.Wpf
|
|||
{
|
||||
var xamlNamespaceRegistry = new XamlNamespaceRegistry();
|
||||
|
||||
var windowType = typeof (Window);
|
||||
var textBlockType = typeof (System.Windows.Controls.TextBlock);
|
||||
var toggleButtonType = typeof (ToggleButton);
|
||||
|
||||
var bindingType = typeof (BindingExtension);
|
||||
var windowType = typeof(Window);
|
||||
var textBlockType = typeof(System.Windows.Controls.TextBlock);
|
||||
var toggleButtonType = typeof(ToggleButton);
|
||||
var rotateTransformType = typeof(RotateTransform);
|
||||
var bindingType = typeof(BindingExtension);
|
||||
|
||||
var rootNs = XamlNamespace.Map(WpfRootNs)
|
||||
.With(
|
||||
new[]
|
||||
{
|
||||
Route.Assembly(bindingType.Assembly).WithNamespaces(
|
||||
new[] {bindingType.Namespace}),
|
||||
Route.Assembly(rotateTransformType.Assembly).WithNamespaces(
|
||||
new[] { rotateTransformType.Namespace}),
|
||||
Route.Assembly(bindingType.Assembly).WithNamespaces(
|
||||
new[] {bindingType.Namespace}),
|
||||
Route.Assembly(windowType.Assembly).WithNamespaces(
|
||||
|
@ -43,7 +48,7 @@ namespace OmniXaml.Wpf
|
|||
})
|
||||
});
|
||||
|
||||
foreach (var ns in new List<XamlNamespace> {rootNs})
|
||||
foreach (var ns in new List<XamlNamespace> { rootNs })
|
||||
{
|
||||
xamlNamespaceRegistry.AddNamespace(ns);
|
||||
}
|
||||
|
|
|
@ -75,6 +75,8 @@
|
|||
<Compile Include="NewAssembler\SuperObjectAssembler.cs" />
|
||||
<Compile Include="NewAssembler\Commands\ValueCommand.cs" />
|
||||
<Compile Include="NewAssembler\ValuePipeline.cs" />
|
||||
<Compile Include="Parsers\ProtoParser\SuperProtoParser\IXmlReader.cs" />
|
||||
<Compile Include="Parsers\ProtoParser\SuperProtoParser\XmlCompatibilityReader.cs" />
|
||||
<Compile Include="TypeConversion\BuiltInConverters\TypeTypeConverter.cs" />
|
||||
<Compile Include="TypeConversion\IXamlTypeConverterContext.cs" />
|
||||
<Compile Include="TypeConversion\XamlTypeConverterContext.cs" />
|
||||
|
|
|
@ -7,9 +7,9 @@ namespace OmniXaml.Parsers.ProtoParser.SuperProtoParser
|
|||
|
||||
internal class AttributeReader
|
||||
{
|
||||
private readonly XmlReader reader;
|
||||
private readonly IXmlReader reader;
|
||||
|
||||
public AttributeReader(XmlReader reader)
|
||||
public AttributeReader(IXmlReader reader)
|
||||
{
|
||||
this.reader = reader;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
namespace OmniXaml.Parsers.ProtoParser.SuperProtoParser
|
||||
{
|
||||
using System.Xml;
|
||||
|
||||
internal interface IXmlReader
|
||||
{
|
||||
void Read();
|
||||
XmlNodeType NodeType { get; }
|
||||
bool IsEmptyElement { get; }
|
||||
string Prefix { get; }
|
||||
string LocalName { get; }
|
||||
string Name { get; }
|
||||
string Value { get; }
|
||||
bool MoveToFirstAttribute();
|
||||
bool MoveToNextAttribute();
|
||||
void MoveToElement();
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@
|
|||
{
|
||||
private readonly WiringContext wiringContext;
|
||||
private readonly ProtoNodeBuilder nodeBuilder;
|
||||
private XmlReader reader;
|
||||
private IXmlReader reader;
|
||||
|
||||
public SuperProtoParser(WiringContext wiringContext)
|
||||
{
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
public IEnumerable<ProtoXamlNode> Parse(string xml)
|
||||
{
|
||||
reader = XmlReader.Create(new StringReader(xml));
|
||||
reader = new XmlCompatibilityReader(new StringReader(xml));
|
||||
reader.Read();
|
||||
|
||||
return ParseElement();
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
namespace OmniXaml.Parsers.ProtoParser.SuperProtoParser
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
|
||||
internal class XmlCompatibilityReader : IXmlReader
|
||||
{
|
||||
private readonly XmlReader xmlReader;
|
||||
|
||||
public XmlCompatibilityReader(TextReader stringReader)
|
||||
{
|
||||
xmlReader = XmlReader.Create(stringReader);
|
||||
}
|
||||
|
||||
public void Read()
|
||||
{
|
||||
xmlReader.Read();
|
||||
}
|
||||
|
||||
public XmlNodeType NodeType => xmlReader.NodeType;
|
||||
|
||||
public bool IsEmptyElement => xmlReader.IsEmptyElement;
|
||||
public string Prefix => xmlReader.Prefix;
|
||||
public string LocalName => xmlReader.LocalName;
|
||||
public string Name => xmlReader.Name;
|
||||
public string Value => xmlReader.Value;
|
||||
public bool MoveToFirstAttribute()
|
||||
{
|
||||
var hadNext = xmlReader.MoveToFirstAttribute();
|
||||
if (ShouldIgnore)
|
||||
{
|
||||
return xmlReader.MoveToNextAttribute();
|
||||
}
|
||||
|
||||
return hadNext;
|
||||
}
|
||||
|
||||
public bool MoveToNextAttribute()
|
||||
{
|
||||
bool hadNext;
|
||||
|
||||
do
|
||||
{
|
||||
hadNext = xmlReader.MoveToNextAttribute();
|
||||
} while (ShouldIgnore && hadNext);
|
||||
|
||||
return hadNext;
|
||||
}
|
||||
|
||||
private bool ShouldIgnore => IsDesignerOnly || IsUnsupportedAttribute;
|
||||
private bool IsUnsupportedAttribute => UnsupportedAttributes.Contains(Name);
|
||||
public IEnumerable<string> UnsupportedAttributes { get; } = new Collection<string> { "x:Name", "x:Key", "x:Class" };
|
||||
|
||||
private bool IsDesignerOnly => xmlReader.Prefix == "d" || Name == "mc:Ignorable";
|
||||
|
||||
public void MoveToElement()
|
||||
{
|
||||
xmlReader.MoveToElement();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,7 +11,7 @@
|
|||
public class WpfLoaderViewModel : XamlVisualizerViewModel
|
||||
{
|
||||
private Snippet selectedSnippet;
|
||||
|
||||
|
||||
public WpfLoaderViewModel()
|
||||
{
|
||||
IXamlSnippetProvider snippetsProvider = new XamlSnippetProvider(typeof(Dummy).Assembly, "Xaml.Tests.Resources.Wpf.resources");
|
||||
|
@ -42,7 +42,8 @@
|
|||
{
|
||||
var localLoader = new WpfXamlLoader();
|
||||
|
||||
var window = (Window)localLoader.Load(Xaml);
|
||||
var visualTree = localLoader.Load(Xaml);
|
||||
var window = GetVisualizerWindow(visualTree);
|
||||
window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||
window.DataContext = new TestViewModel();
|
||||
window.Show();
|
||||
|
@ -54,6 +55,18 @@
|
|||
}
|
||||
}
|
||||
|
||||
private Window GetVisualizerWindow(object visualTree)
|
||||
{
|
||||
var tree = visualTree as Window;
|
||||
if (tree != null)
|
||||
{
|
||||
return tree;
|
||||
}
|
||||
|
||||
var window = new Window { Content = visualTree };
|
||||
return window;
|
||||
}
|
||||
|
||||
private static void ShowProblemLoadingError(Exception e)
|
||||
{
|
||||
MessageBox.Show(
|
||||
|
|
|
@ -32,15 +32,15 @@
|
|||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
public void BindingTest()
|
||||
public void DataTemplate()
|
||||
{
|
||||
var visualTree = LoadXaml(Resources.DataTemplate);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[TestCategory("NeedsGraphics")]
|
||||
|
||||
public void ShowCaseTest()
|
||||
public void ShowCase()
|
||||
{
|
||||
var visualTree = LoadXaml(Resources.ShowCase);
|
||||
}
|
||||
|
@ -51,5 +51,22 @@
|
|||
{
|
||||
var visualTree = LoadXaml(Resources.MicroShowCase);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
||||
public void Stage1()
|
||||
{
|
||||
var visualTree = LoadXaml(Resources.Stage1);
|
||||
}
|
||||
|
||||
public void Stage2()
|
||||
{
|
||||
var visualTree = LoadXaml(Resources.Stage2);
|
||||
}
|
||||
|
||||
public void Stage3()
|
||||
{
|
||||
var visualTree = LoadXaml(Resources.Stage3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,6 +62,17 @@
|
|||
var dummyClass = actualInstance as DummyClass;
|
||||
Assert.IsNotNull(dummyClass);
|
||||
Assert.AreEqual(Container.GetProperty(dummyClass), "Value");
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Ignorable()
|
||||
{
|
||||
var actualInstance = Loader.Load(Dummy.Ignorable);
|
||||
|
||||
Assert.IsInstanceOfType(actualInstance, typeof(DummyClass), "The retrieved instance should be of type DummyClass");
|
||||
var dummyClass = actualInstance as DummyClass;
|
||||
Assert.IsNotNull(dummyClass);
|
||||
Assert.AreEqual("Property!", dummyClass.SampleProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,174 +1,154 @@
|
|||
namespace OmniXaml.Tests.XamlXmlReaderTests
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Classes;
|
||||
using Glass;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using OmniXaml.Parsers.ProtoParser;
|
||||
using OmniXaml.Parsers.ProtoParser.SuperProtoParser;
|
||||
using OmniXaml.Parsers.XamlNodes;
|
||||
using Xaml.Tests.Resources;
|
||||
|
||||
[TestClass]
|
||||
public class NodeDumpTests : GivenAWiringContext
|
||||
{
|
||||
private readonly XamlNodeBuilder nodeBuilder;
|
||||
|
||||
public NodeDumpTests()
|
||||
{
|
||||
|
||||
|
||||
nodeBuilder = new XamlNodeBuilder(WiringContext.TypeContext);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ReadSingleInstance()
|
||||
{
|
||||
var contents = FlattenNodesFromXaml(Dummy.SingleInstance);
|
||||
|
||||
var expected = new List<XamlNode>
|
||||
{
|
||||
nodeBuilder.NamespacePrefixDeclaration("root", ""),
|
||||
nodeBuilder.StartObject(typeof (DummyClass)),
|
||||
nodeBuilder.EndObject(),
|
||||
};
|
||||
|
||||
XamlNodesAssert.AreEssentiallyTheSame(expected, contents);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Description("With no namespace, it fails")]
|
||||
public void ReadWithChild()
|
||||
{
|
||||
var contents = FlattenNodesFromXaml(Dummy.InstanceWithChild);
|
||||
|
||||
var expected = new List<XamlNode>
|
||||
{
|
||||
nodeBuilder.NamespacePrefixDeclaration("root", ""),
|
||||
nodeBuilder.StartObject(typeof (DummyClass)),
|
||||
nodeBuilder.StartMember<DummyClass>(d => d.Child),
|
||||
nodeBuilder.StartObject(typeof(ChildClass)),
|
||||
nodeBuilder.EndObject(),
|
||||
nodeBuilder.EndMember(),
|
||||
nodeBuilder.EndObject(),
|
||||
};
|
||||
|
||||
XamlNodesAssert.AreEssentiallyTheSame(expected, contents);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void InstanceWithStringPropertyAndNsDeclaration()
|
||||
{
|
||||
var contents = FlattenNodesFromXaml(Dummy.StringProperty);
|
||||
|
||||
var expected = new List<XamlNode>
|
||||
{
|
||||
nodeBuilder.NamespacePrefixDeclaration("root", ""),
|
||||
nodeBuilder.StartObject(typeof (DummyClass)),
|
||||
nodeBuilder.StartMember<DummyClass>(d => d.SampleProperty),
|
||||
nodeBuilder.Value("Property!"),
|
||||
nodeBuilder.EndMember(),
|
||||
nodeBuilder.EndObject(),
|
||||
};
|
||||
|
||||
XamlNodesAssert.AreEssentiallyTheSame(expected, contents);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ClassWithInnerCollection()
|
||||
{
|
||||
var contents = FlattenNodesFromXaml(Dummy.ClassWithInnerCollection);
|
||||
|
||||
var expected = new List<XamlNode>
|
||||
{
|
||||
nodeBuilder.NamespacePrefixDeclaration("root", ""),
|
||||
nodeBuilder.StartObject(typeof (DummyClass)),
|
||||
nodeBuilder.StartMember<DummyClass>(d => d.Items),
|
||||
nodeBuilder.GetObject(),
|
||||
nodeBuilder.Items(),
|
||||
nodeBuilder.StartObject(typeof (Item)),
|
||||
nodeBuilder.EndObject(),
|
||||
nodeBuilder.EndMember(),
|
||||
nodeBuilder.EndObject(),
|
||||
nodeBuilder.EndMember(),
|
||||
nodeBuilder.EndObject(),
|
||||
};
|
||||
|
||||
XamlNodesAssert.AreEssentiallyTheSame(expected, contents);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
public void ReadRealXamlStage1()
|
||||
{
|
||||
var actualNodes = FlattenNodesFromXaml(Dummy.XamlStage1);
|
||||
var expectedNodes = ParseResult(Dummy.XamlStage1_Result);
|
||||
|
||||
AssertNodesAreEqual(expectedNodes, actualNodes.Select(node => node.NodeType).ToList());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Ignore]
|
||||
public void ReadRealXamlStage2()
|
||||
{
|
||||
var actualNodes = FlattenNodesFromXaml(Dummy.XamlStage2);
|
||||
var expectedNodes = ParseResult(Dummy.XamlStage2_Result);
|
||||
|
||||
AssertNodesAreEqual(expectedNodes, actualNodes.Select(node => node.NodeType).ToList());
|
||||
}
|
||||
|
||||
private static void AssertNodesAreEqual(IList<XamlNodeType> expectedNodes, IList<XamlNodeType> actualNodes)
|
||||
{
|
||||
CollectionAssert.AreEqual(
|
||||
expectedNodes.ToList(),
|
||||
actualNodes.ToList(),
|
||||
"\nExpected:\n{0}\n\nActual:\n{1}",
|
||||
Extensions.ToString(expectedNodes),
|
||||
Extensions.ToString(actualNodes));
|
||||
}
|
||||
|
||||
private static IList<XamlNodeType> ParseResult(string str)
|
||||
{
|
||||
var nodes = new List<XamlNodeType>();
|
||||
|
||||
var nodeTypes = Enum.GetNames(typeof(XamlNodeType));
|
||||
|
||||
using (var reader = new StreamReader(new MemoryStream(Encoding.UTF8.GetBytes(str))))
|
||||
{
|
||||
var builder = new StringBuilder();
|
||||
|
||||
while (!reader.EndOfStream)
|
||||
{
|
||||
var readChar = (char)reader.Read();
|
||||
builder.Append(readChar);
|
||||
var currentBuffer = builder.ToString();
|
||||
|
||||
var nodeType = nodeTypes.FirstOrDefault(nodeName => nodeName == currentBuffer);
|
||||
|
||||
if (nodeType != null)
|
||||
{
|
||||
XamlNodeType parsedNode;
|
||||
if (Enum.TryParse(nodeType, out parsedNode))
|
||||
{
|
||||
nodes.Add(parsedNode);
|
||||
builder.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
private IList<XamlNode> FlattenNodesFromXaml(string xaml)
|
||||
{
|
||||
var pullParser = new XamlNodesPullParser(WiringContext);
|
||||
var protoNodes = new SuperProtoParser(WiringContext).Parse(xaml);
|
||||
return pullParser.Parse(protoNodes).ToList();
|
||||
}
|
||||
}
|
||||
namespace OmniXaml.Tests.XamlXmlReaderTests
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Classes;
|
||||
using Glass;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using OmniXaml.Parsers.ProtoParser;
|
||||
using OmniXaml.Parsers.ProtoParser.SuperProtoParser;
|
||||
using OmniXaml.Parsers.XamlNodes;
|
||||
using Xaml.Tests.Resources;
|
||||
|
||||
[TestClass]
|
||||
public class NodeDumpTests : GivenAWiringContext
|
||||
{
|
||||
private readonly XamlNodeBuilder nodeBuilder;
|
||||
|
||||
public NodeDumpTests()
|
||||
{
|
||||
|
||||
|
||||
nodeBuilder = new XamlNodeBuilder(WiringContext.TypeContext);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ReadSingleInstance()
|
||||
{
|
||||
var contents = FlattenNodesFromXaml(Dummy.SingleInstance);
|
||||
|
||||
var expected = new List<XamlNode>
|
||||
{
|
||||
nodeBuilder.NamespacePrefixDeclaration("root", ""),
|
||||
nodeBuilder.StartObject(typeof (DummyClass)),
|
||||
nodeBuilder.EndObject(),
|
||||
};
|
||||
|
||||
XamlNodesAssert.AreEssentiallyTheSame(expected, contents);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[Description("With no namespace, it fails")]
|
||||
public void ReadWithChild()
|
||||
{
|
||||
var contents = FlattenNodesFromXaml(Dummy.InstanceWithChild);
|
||||
|
||||
var expected = new List<XamlNode>
|
||||
{
|
||||
nodeBuilder.NamespacePrefixDeclaration("root", ""),
|
||||
nodeBuilder.StartObject(typeof (DummyClass)),
|
||||
nodeBuilder.StartMember<DummyClass>(d => d.Child),
|
||||
nodeBuilder.StartObject(typeof(ChildClass)),
|
||||
nodeBuilder.EndObject(),
|
||||
nodeBuilder.EndMember(),
|
||||
nodeBuilder.EndObject(),
|
||||
};
|
||||
|
||||
XamlNodesAssert.AreEssentiallyTheSame(expected, contents);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void InstanceWithStringPropertyAndNsDeclaration()
|
||||
{
|
||||
var contents = FlattenNodesFromXaml(Dummy.StringProperty);
|
||||
|
||||
var expected = new List<XamlNode>
|
||||
{
|
||||
nodeBuilder.NamespacePrefixDeclaration("root", ""),
|
||||
nodeBuilder.StartObject(typeof (DummyClass)),
|
||||
nodeBuilder.StartMember<DummyClass>(d => d.SampleProperty),
|
||||
nodeBuilder.Value("Property!"),
|
||||
nodeBuilder.EndMember(),
|
||||
nodeBuilder.EndObject(),
|
||||
};
|
||||
|
||||
XamlNodesAssert.AreEssentiallyTheSame(expected, contents);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ClassWithInnerCollection()
|
||||
{
|
||||
var contents = FlattenNodesFromXaml(Dummy.ClassWithInnerCollection);
|
||||
|
||||
var expected = new List<XamlNode>
|
||||
{
|
||||
nodeBuilder.NamespacePrefixDeclaration("root", ""),
|
||||
nodeBuilder.StartObject(typeof (DummyClass)),
|
||||
nodeBuilder.StartMember<DummyClass>(d => d.Items),
|
||||
nodeBuilder.GetObject(),
|
||||
nodeBuilder.Items(),
|
||||
nodeBuilder.StartObject(typeof (Item)),
|
||||
nodeBuilder.EndObject(),
|
||||
nodeBuilder.EndMember(),
|
||||
nodeBuilder.EndObject(),
|
||||
nodeBuilder.EndMember(),
|
||||
nodeBuilder.EndObject(),
|
||||
};
|
||||
|
||||
XamlNodesAssert.AreEssentiallyTheSame(expected, contents);
|
||||
}
|
||||
|
||||
private static void AssertNodesAreEqual(IList<XamlNodeType> expectedNodes, IList<XamlNodeType> actualNodes)
|
||||
{
|
||||
CollectionAssert.AreEqual(
|
||||
expectedNodes.ToList(),
|
||||
actualNodes.ToList(),
|
||||
"\nExpected:\n{0}\n\nActual:\n{1}",
|
||||
Extensions.ToString(expectedNodes),
|
||||
Extensions.ToString(actualNodes));
|
||||
}
|
||||
|
||||
private static IList<XamlNodeType> ParseResult(string str)
|
||||
{
|
||||
var nodes = new List<XamlNodeType>();
|
||||
|
||||
var nodeTypes = Enum.GetNames(typeof(XamlNodeType));
|
||||
|
||||
using (var reader = new StreamReader(new MemoryStream(Encoding.UTF8.GetBytes(str))))
|
||||
{
|
||||
var builder = new StringBuilder();
|
||||
|
||||
while (!reader.EndOfStream)
|
||||
{
|
||||
var readChar = (char)reader.Read();
|
||||
builder.Append(readChar);
|
||||
var currentBuffer = builder.ToString();
|
||||
|
||||
var nodeType = nodeTypes.FirstOrDefault(nodeName => nodeName == currentBuffer);
|
||||
|
||||
if (nodeType != null)
|
||||
{
|
||||
XamlNodeType parsedNode;
|
||||
if (Enum.TryParse(nodeType, out parsedNode))
|
||||
{
|
||||
nodes.Add(parsedNode);
|
||||
builder.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
private IList<XamlNode> FlattenNodesFromXaml(string xaml)
|
||||
{
|
||||
var pullParser = new XamlNodesPullParser(WiringContext);
|
||||
var protoNodes = new SuperProtoParser(WiringContext).Parse(xaml);
|
||||
return pullParser.Parse(protoNodes).ToList();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -272,15 +272,6 @@ namespace Xaml.Tests.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to NamespaceDeclarationNamespaceDeclarationNamespaceDeclarationNamespaceDeclarationNamespaceDeclarationStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberEndObjectValueStartObjectStartMemberValueEndMemberEndObjectValueStartObjectStartMemberValueEndMemberEndObjectEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueE [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string ExpectedStage1 {
|
||||
get {
|
||||
return ResourceManager.GetString("ExpectedStage1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <DummyClass xmlns="root">
|
||||
/// <DummyClass.Child>
|
||||
|
@ -315,9 +306,24 @@ namespace Xaml.Tests.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <DummyClass xmlns="root"
|
||||
/// xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
/// mc:Ignorable="d"
|
||||
/// xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
/// d:DesignWidth="300"
|
||||
/// SampleProperty="Property!">
|
||||
///</DummyClass>.
|
||||
/// </summary>
|
||||
public static string Ignorable {
|
||||
get {
|
||||
return ResourceManager.GetString("Ignorable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <DummyClass xmlns="root">
|
||||
/// <SampleProperty>Property!</SampleProperty>
|
||||
/// <DummyClass.SampleProperty>Property!</DummyClass.SampleProperty>
|
||||
///</DummyClass>.
|
||||
/// </summary>
|
||||
public static string InnerContent {
|
||||
|
@ -551,62 +557,5 @@ namespace Xaml.Tests.Resources {
|
|||
return ResourceManager.GetString("WithAttachableProperty", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <Window x:Class="WpfApplication_test1.MainWindow"
|
||||
/// xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
/// xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
/// xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
/// xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
/// xmlns:local="clr-namespace:WpfApplication_test1"
|
||||
/// mc:Ignorable="d"
|
||||
/// Title="MainWindow" Height="350" Width="525">
|
||||
/// <Grid Background="BlueViolet">
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string XamlStage1 {
|
||||
get {
|
||||
return ResourceManager.GetString("XamlStage1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to NamespaceDeclarationNamespaceDeclarationNamespaceDeclarationNamespaceDeclarationNamespaceDeclarationStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberEndObjectValueStartObjectStartMemberValueEndMemberEndObjectValueStartObjectStartMemberValueEndMemberEndObjectEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueE [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string XamlStage1_Result {
|
||||
get {
|
||||
return ResourceManager.GetString("XamlStage1_Result", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <UserControl
|
||||
/// x:Class="NcoreCpuMarkW8.UI.Controls.UcSpeedmeter"
|
||||
/// xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
/// xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
/// xmlns:local="using:NcoreCpuMarkW8.UI.Controls"
|
||||
/// xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
/// xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
/// mc:Ignorable="d"
|
||||
/// d:DesignHeight="400"
|
||||
/// d:DesignWidth="600">
|
||||
///
|
||||
/// <Grid MinHeight="400" MinWidth="600">
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string XamlStage2 {
|
||||
get {
|
||||
return ResourceManager.GetString("XamlStage2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to NamespaceDeclarationNamespaceDeclarationNamespaceDeclarationNamespaceDeclarationNamespaceDeclarationStartObjectStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberStartObjectStartMemberStartObjectStartMemberValueEndMemberEndObjectValueStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberValueEndMemberEndObjectEndM [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string XamlStage2_Result {
|
||||
get {
|
||||
return ResourceManager.GetString("XamlStage2_Result", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,9 +169,6 @@
|
|||
<data name="EnumProperty" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>xaml\dummy\enumproperty.xaml;System.String, System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;utf-8</value>
|
||||
</data>
|
||||
<data name="ExpectedStage1" xml:space="preserve">
|
||||
<value>NamespaceDeclarationNamespaceDeclarationNamespaceDeclarationNamespaceDeclarationNamespaceDeclarationStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberEndObjectValueStartObjectStartMemberValueEndMemberEndObjectValueStartObjectStartMemberValueEndMemberEndObjectEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberEndObjectEndMemberEndObjectEndMemberEndObject</value>
|
||||
</data>
|
||||
<data name="ExpectedStage11" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>xaml\dummy\expectedstage1.xaml;System.String, System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;utf-8</value>
|
||||
</data>
|
||||
|
@ -226,18 +223,6 @@
|
|||
<data name="WithAttachableProperty" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>xaml\dummy\withattachableproperty.xaml;System.String, System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;utf-8</value>
|
||||
</data>
|
||||
<data name="XamlStage1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>xaml\dummy\xamlstage1.xaml;System.String, System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;utf-8</value>
|
||||
</data>
|
||||
<data name="XamlStage1_Result" xml:space="preserve">
|
||||
<value>NamespaceDeclarationNamespaceDeclarationNamespaceDeclarationNamespaceDeclarationNamespaceDeclarationStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberEndObjectValueStartObjectStartMemberValueEndMemberEndObjectValueStartObjectStartMemberValueEndMemberEndObjectEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberEndObjectEndMemberEndObjectEndMemberEndObject</value>
|
||||
</data>
|
||||
<data name="XamlStage2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>xaml\dummy\xamlstage2.xaml;System.String, System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;utf-8</value>
|
||||
</data>
|
||||
<data name="XamlStage2_Result" xml:space="preserve">
|
||||
<value>NamespaceDeclarationNamespaceDeclarationNamespaceDeclarationNamespaceDeclarationNamespaceDeclarationStartObjectStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberStartObjectStartMemberStartObjectStartMemberValueEndMemberEndObjectValueStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberValueEndMemberEndObjectEndMemberEndObjectValueStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberStartObjectStartMemberValueEndMemberStartMemberValueEndMemberEndObjectEndMemberEndObjectValueStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberEndObjectValueStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberEndObjectValueStartObjectStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberStartMemberValueEndMemberEndObjectEndMemberEndObjectEndMemberEndObjectEndMemberEndObject</value>
|
||||
</data>
|
||||
<data name="FourLevelsOfNesting" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>xaml\dummy\fourlevelsofnesting.xaml;System.String, System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;utf-8</value>
|
||||
</data>
|
||||
|
@ -253,4 +238,7 @@
|
|||
<data name="InnerContent" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>xaml\dummy\innercontent.xaml;System.String, System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;utf-8</value>
|
||||
</data>
|
||||
<data name="Ignorable" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>xaml\dummy\ignorable.xaml;System.String, System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;utf-8</value>
|
||||
</data>
|
||||
</root>
|
|
@ -79,21 +79,11 @@ namespace Xaml.Tests.Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <Window Title="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Height="350" Width="525">
|
||||
/// <Grid>
|
||||
/// <Grid.RowDefinitions>
|
||||
/// <RowDefinition Height="Auto"/>
|
||||
/// <RowDefinition />
|
||||
/// </Grid.RowDefinitions>
|
||||
/// <Menu>
|
||||
/// <MenuItem Header="File">
|
||||
/// <MenuItem Header="Open">
|
||||
/// <MenuItem.Icon>
|
||||
/// <Image Source="github_icon.png"></Image>
|
||||
/// </MenuItem.Icon>
|
||||
/// </MenuItem>
|
||||
/// <MenuItem Header="Save">
|
||||
/// <MenuItem He [rest of string was truncated]";.
|
||||
/// Looks up a localized string similar to <Menu xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
/// <MenuItem Header="File">
|
||||
/// <MenuItem />
|
||||
/// </MenuItem>
|
||||
///</Menu>.
|
||||
/// </summary>
|
||||
public static string MicroShowCase {
|
||||
get {
|
||||
|
@ -146,6 +136,44 @@ namespace Xaml.Tests.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <Window x:Class="WpfApplication_test1.MainWindow"
|
||||
/// xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
/// xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
/// xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
/// xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
/// xmlns:local="clr-namespace:WpfApplication_test1"
|
||||
/// mc:Ignorable="d"
|
||||
/// Title="MainWindow" Height="350" Width="525">
|
||||
/// <Grid Background="BlueViolet">
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string Stage2 {
|
||||
get {
|
||||
return ResourceManager.GetString("Stage2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <UserControl
|
||||
/// x:Class="NcoreCpuMarkW8.UI.Controls.UcSpeedmeter"
|
||||
/// xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
/// xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
/// xmlns:local="using:NcoreCpuMarkW8.UI.Controls"
|
||||
/// xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
/// xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
/// mc:Ignorable="d"
|
||||
/// d:DesignHeight="400"
|
||||
/// d:DesignWidth="600">
|
||||
/// <Grid MinHeight="400" MinWidth="600">
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
public static string Stage3 {
|
||||
get {
|
||||
return ResourceManager.GetString("Stage3", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"></Window>.
|
||||
/// </summary>
|
||||
|
|
|
@ -130,6 +130,12 @@
|
|||
<data name="Stage1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>xaml\wpf\stage1.xaml;System.String, System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;utf-8</value>
|
||||
</data>
|
||||
<data name="Stage2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>xaml\wpf\stage2.xaml;System.String, System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;utf-8</value>
|
||||
</data>
|
||||
<data name="Stage3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>xaml\wpf\stage3.xaml;System.String, System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;utf-8</value>
|
||||
</data>
|
||||
<data name="Window" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>xaml\wpf\window.xaml;System.String, System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;utf-8</value>
|
||||
</data>
|
||||
|
|
|
@ -34,17 +34,17 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Dummy.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Dummy.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ProtoInputs1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>ProtoInputs.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dummy.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Dummy.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Wpf.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
|
@ -54,6 +54,7 @@
|
|||
<ItemGroup>
|
||||
<EmbeddedResource Include="Dummy.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
<LastGenOutput>Dummy.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ProtoInputs.resx">
|
||||
|
@ -63,6 +64,7 @@
|
|||
<EmbeddedResource Include="Wpf.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Wpf.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -173,7 +175,7 @@
|
|||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Xaml\Dummy\StringProperty.xaml">
|
||||
<None Include="Xaml\Dummy\Ignorable.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
@ -263,12 +265,7 @@
|
|||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Xaml\Dummy\XamlStage2.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Xaml\Dummy\XamlStage1.xaml">
|
||||
<None Include="Xaml\Wpf\Stage2.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
@ -302,6 +299,16 @@
|
|||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Xaml\Wpf\Stage3.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Xaml\Dummy\StringProperty.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.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.
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<DummyClass xmlns="root"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
d:DesignWidth="300"
|
||||
SampleProperty="Property!">
|
||||
</DummyClass>
|
|
@ -8,26 +8,28 @@
|
|||
mc:Ignorable="d"
|
||||
d:DesignHeight="400"
|
||||
d:DesignWidth="600">
|
||||
|
||||
<Grid MinHeight="400" MinWidth="600">
|
||||
<Canvas>
|
||||
<Image Source= "/Assets/velocimetro.png" ></Image>
|
||||
<Image x:Name="mgBigSpeed" Source= "/Assets/medidorGrande.png" Canvas.Left="300" Canvas.Top="58"
|
||||
<Image></Image>
|
||||
<Image x:Name="mgBigSpeed" Canvas.Left="300" Canvas.Top="58"
|
||||
RenderTransformOrigin="0.5, 0.9">
|
||||
<Image.RenderTransform>
|
||||
<RotateTransform x:Name="RotateTransformBig" Angle="-90.00"/>
|
||||
<RotateTransform x:Name="RotateTransformBig" Angle="-90.00" />
|
||||
</Image.RenderTransform>
|
||||
</Image>
|
||||
<Image x:Name="mgSmallSpeed" Source= "/Assets/medidorPequeno.png" Canvas.Left="300" Canvas.Top="168"
|
||||
<Image x:Name="mgSmallSpeed" Canvas.Left="300" Canvas.Top="168"
|
||||
RenderTransformOrigin="0.5, 0.81" UseLayoutRounding="False" d:LayoutRounding="Auto">
|
||||
<Image.RenderTransform>
|
||||
<RotateTransform x:Name="RotateTransformSmall" Angle="-90.00"/>
|
||||
<RotateTransform x:Name="RotateTransformSmall" Angle="-90.00" />
|
||||
</Image.RenderTransform>
|
||||
</Image>
|
||||
<Image Source="/Assets/bolaVelocimetro.png" Canvas.Left="233" Canvas.Top="244"></Image>
|
||||
<TextBlock x:Name="txtSpeedBig" Canvas.Left="227" TextWrapping="Wrap" Text="speedBig" Canvas.Top="57" Height="29" Width="159" FontFamily="Calibri" FontSize="22" Foreground="#FF026A9C" HorizontalAlignment="Center" TextAlignment="Center"/>
|
||||
<TextBlock x:Name="txtSpeedSmall" Canvas.Left="227" TextWrapping="Wrap" Text="speedSmall" Canvas.Top="162" Height="29" Width="159" FontFamily="Calibri" FontSize="22" Foreground="#FFBD0B0E" HorizontalAlignment="Center" TextAlignment="Center"/>
|
||||
<Image Canvas.Left="233" Canvas.Top="244"></Image>
|
||||
<TextBlock x:Name="txtSpeedBig" Canvas.Left="227" TextWrapping="Wrap" Text="speedBig" Canvas.Top="57"
|
||||
Height="29" Width="159" FontFamily="Calibri" FontSize="22" Foreground="#FF026A9C"
|
||||
HorizontalAlignment="Center" TextAlignment="Center" />
|
||||
<TextBlock x:Name="txtSpeedSmall" Canvas.Left="227" TextWrapping="Wrap" Text="speedSmall" Canvas.Top="162"
|
||||
Height="29" Width="159" FontFamily="Calibri" FontSize="22" Foreground="#FFBD0B0E"
|
||||
HorizontalAlignment="Center" TextAlignment="Center" />
|
||||
</Canvas>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
Загрузка…
Ссылка в новой задаче