53 references to XamlParseException
Microsoft.Maui.Controls (15)
BindablePropertyConverter.cs (10)
42
throw new
XamlParseException
(msg, lineinfo);
60
throw new
XamlParseException
($"Can't resolve {parts[0]}", lineinfo);
69
throw new
XamlParseException
(msg, lineinfo);
73
throw new
XamlParseException
($"Can't resolve {value}. Syntax is [[prefix:]Type.]PropertyName.", lineinfo);
102
throw new
XamlParseException
($"Can't resolve {name} on {type.Name}", lineinfo);
106
throw new
XamlParseException
($"The PropertyName of {type.Name}.{name} is not {propertyName}", lineinfo);
136
throw new
XamlParseException
($"Expected {nameof(VisualStateGroup)} but found {parents[2]}.", lineInfo);
143
throw new
XamlParseException
($"Expected {nameof(VisualStateGroupList)} but found {parents[3]}.", lineInfo);
149
throw new
XamlParseException
($"Expected {nameof(Setter)} but found {parents[4]}.", lineInfo);
158
throw new
XamlParseException
($"Unable to find a TragetType for the Bindable Property. Try prefixing it with the TargetType.", lineInfo);
Interactivity\PropertyCondition.cs (2)
48
throw new
XamlParseException
($"Multiple properties with name '{Property.DeclaringType}.{Property.PropertyName}' found.", new XmlLineInfo(), innerException: e);
78
throw new
XamlParseException
($"Multiple properties with name '{Property.DeclaringType}.{Property.PropertyName}' found.", new XmlLineInfo(), innerException: e);
StyleSheets\StyleSheet.cs (2)
135
throw new
XamlParseException
($"Resource '{resourcePath}' not found.", lineInfo);
140
throw new
XamlParseException
($"No resource found for '{resourceId}'.", lineInfo);
XamlParseException.cs (1)
40
:
this
(message, GetLineInfo(serviceProvider), innerException)
Microsoft.Maui.Controls.Build.Tasks (2)
CompiledConverters\BindablePropertyConverter.cs (1)
90
throw new
XamlParseException
($"Expected {nameof(VisualStateGroup)} but found {parent.Parent}", lineInfo);
CompiledValueProviders\StyleSheetProvider.cs (1)
61
throw new
XamlParseException
($"Resource '{source}' not found.", node);
Microsoft.Maui.Controls.Xaml (36)
ApplyPropertiesVisitor.cs (14)
143
xpe = new
XamlParseException
("x:Key expects a string literal.", node as IXmlLineInfo);
184
xpe = xpe ?? new
XamlParseException
($"Cannot set the content of {((IElementNode)parentNode).XmlType.Name} as it doesn't have a ContentPropertyAttribute", node);
205
xpe = new
XamlParseException
("x:Key expects a string literal.", node as IXmlLineInfo);
210
xpe = new
XamlParseException
($"Property {parentList.XmlName.LocalName} is null or is not IEnumerable", node);
221
xpe = xpe ?? new
XamlParseException
($"Value of {parentList.XmlName.LocalName} does not have a Add() method", node);
427
xpe = xpe ?? new
XamlParseException
($"Cannot assign property \"{localName}\": Property does not exist, or is not assignable, or mismatching type between value and property", lineInfo);
450
xpe = xpe ?? new
XamlParseException
($"Property {localName} is not found or does not have an accessible getter", lineInfo);
517
exception = new
XamlParseException
($"No method {value} with correct signature found on type {rootElement.GetType()}", lineInfo);
534
exception = new
XamlParseException
($"{elementType.Name} is not a BindableObject", lineInfo);
569
exception = new
XamlParseException
($"{elementType.Name} is not a BindableObject or does not support native bindings", lineInfo);
597
throw new
XamlParseException
($"Multiple methods with name '{property.DeclaringType}.Get{property.PropertyName}' found.", lineInfo, innerException: e);
633
exception = new
XamlParseException
($"{elementType.Name} is not a BindableObject or does not support setting native BindableProperties", lineInfo);
702
throw new
XamlParseException
($"Multiple properties with name '{elementType}.{localName}' found.", lineInfo, innerException: e);
779
exception = new
XamlParseException
("resources in ResourceDictionary require a x:Key attribute", lineInfo);
CreateValuesVisitor.cs (3)
84
throw new
XamlParseException
($"The Property {ctorargname} is required to create a {type.FullName} object.", node);
121
throw new
XamlParseException
(mme.Message, node, mme);
319
throw new
XamlParseException
($"The Property {propname} is required to create a {ctorInfo.DeclaringType.FullName} object.", enode as IXmlLineInfo);
ExpandMarkupsVisitor.cs (2)
85
var ex = new
XamlParseException
("Expression must end with '}'", xmlLineInfo);
100
var ex = new
XamlParseException
("Expression did not end in '}'", xmlLineInfo);
MarkupExtensions\DataTemplateExtension.cs (2)
22
throw new
XamlParseException
("TypeName isn't set.", li);
29
throw new
XamlParseException
($"DataTemplateExtension: Could not locate type for {TypeName}.", lineInfo);
MarkupExtensions\StaticResourceExtension.cs (1)
28
throw new
XamlParseException
($"StaticResource not found for key {Key}", xmlLineInfo);
MarkupExtensions\StyleSheetExtension.cs (1)
30
throw new
XamlParseException
($"Source only accepts Relative URIs", lineInfo);
MarkupExtensions\TypeExtension.cs (1)
21
throw new
XamlParseException
("TypeName isn't set.", li);
RegisterXNamesVisitor.cs (1)
37
var xpe = new
XamlParseException
($"An element with the name \"{(string)node.Value}\" already exists in this NameScope", node);
ResourceDictionaryHelpers.cs (2)
69
throw new
XamlParseException
($"Resource '{resourcePath}' not found.", lineInfo);
74
throw new
XamlParseException
($"No resource found for '{resourceId}'.", lineInfo);
TypeArgumentsParser.cs (2)
27
throw new
XamlParseException
($"Invalid type expression or more than one type declared in '{expression}'", lineInfo, null);
84
throw new
XamlParseException
($"No xmlns declaration for prefix '{prefix}'.", lineinfo, null);
XamlLoader.cs (1)
52
throw new
XamlParseException
(string.Format("No embeddedresource found for {0}", callingType), new XmlLineInfo());
XamlParser.cs (6)
80
throw new
XamlParseException
($"'{reader.Name}' is a duplicate property name.", ((IXmlLineInfo)reader).Clone());
95
throw new
XamlParseException
($"'x:Arguments' is a duplicate directive name.", ((IXmlLineInfo)reader).Clone());
106
throw new
XamlParseException
($"Multiple child elements in {node.XmlType.Name}", ((IXmlLineInfo)reader).Clone());
192
throw new
XamlParseException
("Closing PropertyElement expected", ((IXmlLineInfo)reader).Clone());
426
exception = new
XamlParseException
($"Type {type} is not a GenericTypeDefinition", xmlInfo);
431
exception = new
XamlParseException
($"Type {xmlType.Name} not found in xmlns {xmlType.NamespaceUri}", xmlInfo);