|
|
@ -870,8 +870,7 @@ namespace Ricciolo.StylesExplorer.MarkupReflection |
|
|
|
short extensionIdentifier = (short)-(x & 0xfff); |
|
|
|
short extensionIdentifier = (short)-(x & 0xfff); |
|
|
|
string value = String.Empty; |
|
|
|
string value = String.Empty; |
|
|
|
|
|
|
|
|
|
|
|
switch (x) |
|
|
|
switch (x) { |
|
|
|
{ |
|
|
|
|
|
|
|
case 0x25a: |
|
|
|
case 0x25a: |
|
|
|
// StaticExtension
|
|
|
|
// StaticExtension
|
|
|
|
object resource = this.GetResourceName(valueIdentifier); |
|
|
|
object resource = this.GetResourceName(valueIdentifier); |
|
|
@ -1093,30 +1092,27 @@ namespace Ricciolo.StylesExplorer.MarkupReflection |
|
|
|
CloseElement(); |
|
|
|
CloseElement(); |
|
|
|
|
|
|
|
|
|
|
|
complexPropertyOpened--; |
|
|
|
complexPropertyOpened--; |
|
|
|
// // Valuto se contiene tutte extension
|
|
|
|
// this property could be a markup extension
|
|
|
|
// int start = nodes.IndexOf(propertyElement) + 1;
|
|
|
|
// try to convert it
|
|
|
|
// IEnumerator enumerator = nodes.GetEnumerator();
|
|
|
|
int start = nodes.IndexOf(propertyElement) + 1; |
|
|
|
//
|
|
|
|
IEnumerator enumerator = nodes.GetEnumerator(); |
|
|
|
// int c = 0;
|
|
|
|
|
|
|
|
// while (c < start && enumerator.MoveNext())
|
|
|
|
// move enumerator to the start of this property value
|
|
|
|
// c++;
|
|
|
|
for (int i = 0; i < start && enumerator.MoveNext(); i++) ; |
|
|
|
//
|
|
|
|
|
|
|
|
// if (IsExtension(enumerator))
|
|
|
|
if (IsExtension(enumerator)) { |
|
|
|
// {
|
|
|
|
start--; |
|
|
|
// start--;
|
|
|
|
nodes.RemoveAt(start); |
|
|
|
// nodes.RemoveAt(start);
|
|
|
|
nodes.RemoveLast(); |
|
|
|
// nodes.RemoveLast();
|
|
|
|
|
|
|
|
//
|
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
// StringBuilder sb = new StringBuilder();
|
|
|
|
FormatElementExtension((XmlBamlElement) nodes[start], sb); |
|
|
|
// FormatElementExtension((XmlBamlElement) nodes[start], sb);
|
|
|
|
|
|
|
|
//
|
|
|
|
XmlBamlProperty property = |
|
|
|
// XmlBamlProperty property =
|
|
|
|
new XmlBamlProperty(elements.Peek(), PropertyType.Complex, propertyElement.PropertyDeclaration); |
|
|
|
// new XmlBamlProperty(PropertyType.Complex, propertyElement.PropertyDeclaration);
|
|
|
|
property.Value = sb.ToString(); |
|
|
|
// property.Value = sb.ToString();
|
|
|
|
nodes.Add(property); |
|
|
|
// nodes.Add(property);
|
|
|
|
} |
|
|
|
//
|
|
|
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void FormatElementExtension(XmlBamlElement element, StringBuilder sb) |
|
|
|
void FormatElementExtension(XmlBamlElement element, StringBuilder sb) |
|
|
@ -1535,8 +1531,8 @@ namespace Ricciolo.StylesExplorer.MarkupReflection |
|
|
|
if (identifier < LastKey.StaticResources.Count) |
|
|
|
if (identifier < LastKey.StaticResources.Count) |
|
|
|
return LastKey.StaticResources[(int)identifier]; |
|
|
|
return LastKey.StaticResources[(int)identifier]; |
|
|
|
|
|
|
|
|
|
|
|
return "???" + identifier +"???"; |
|
|
|
// return "???" + identifier +"???";
|
|
|
|
// throw new ArgumentException("Cannot find StaticResource", "identifier");
|
|
|
|
throw new ArgumentException("Cannot find StaticResource", "identifier"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void ReadTextWithConverter() |
|
|
|
void ReadTextWithConverter() |
|
|
|