93 instantiations of XamlParseException
Microsoft.Maui.Controls (24)
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);
ReferenceTypeConverter.cs (1)
30 return referenceProvider.FindByName(value) ?? throw new XamlParseException($"Can't resolve name '{value}' on Element", serviceProvider);
Setter.cs (4)
31 throw new XamlParseException("Property not set", serviceProvider); 43 throw new XamlParseException($"Multiple properties with name '{Property.DeclaringType}.{Property.PropertyName}' found.", serviceProvider, innerException: e); 53 throw new XamlParseException($"Multiple methods with name '{Property.DeclaringType}.Get{Property.PropertyName}' found.", serviceProvider, innerException: e); 72 targetObject = element.FindByName(TargetName) as BindableObject ?? throw new XamlParseException($"Cannot resolve '{TargetName}' as Setter Target for '{target}'.");
StyleSheets\Style.cs (2)
109 throw new XamlParseException($"Multiple properties with name '{property.DeclaringType}.{property.PropertyName}' found.", serviceProvider, innerException: e); 119 throw new XamlParseException($"Multiple methods with name '{property.DeclaringType}.Get{property.PropertyName}' found.", serviceProvider, 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);
Visuals\VisualTypeConverter.cs (1)
173 throw new XamlParseException($"Cannot convert \"{strValue}\" into {typeof(IVisual)}");
Xaml\TypeConversionExtensions.cs (1)
159 exception = e as XamlParseException ?? new XamlParseException($"Type converter failed: {e.Message}", serviceProvider, e);
Xaml\ValueConverterProvider.cs (1)
19 throw new XamlParseException(exception.Message, serviceProvider, exception);
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 (67)
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 (4)
84 throw new XamlParseException($"The Property {ctorargname} is required to create a {type.FullName} object.", node); 121 throw new XamlParseException(mme.Message, node, mme); 143 var xamlpe = e as XamlParseException ?? new XamlParseException("Markup extension failed", serviceProvider, e); 319 throw new XamlParseException($"The Property {propname} is required to create a {ctorInfo.DeclaringType.FullName} object.", enode as IXmlLineInfo);
ExpandMarkupsVisitor.cs (3)
85 var ex = new XamlParseException("Expression must end with '}'", xmlLineInfo); 100 var ex = new XamlParseException("Expression did not end in '}'", xmlLineInfo); 194 var ex = new XamlParseException($"MarkupExtension not found for {match}", serviceProvider);
MarkupExpressionParser.cs (6)
59 throw new XamlParseException("Expression must end with '}'", serviceProvider); 67 throw new XamlParseException("Expression did not end in '}'", serviceProvider); 161 throw new XamlParseException("Unexpected end of markup expression", serviceProvider); 167 throw new XamlParseException("Unexpected character following value string", serviceProvider); 218 throw new XamlParseException("Unterminated quoted string", serviceProvider); 221 throw new XamlParseException("Empty value string in markup expression", serviceProvider);
MarkupExtensionParser.cs (5)
43 throw new XamlParseException($"MarkupExtension not found for {match}", serviceProvider); 48 throw new XamlParseException($"Missing public default constructor for MarkupExtension {match}", serviceProvider); 80 throw new XamlParseException($"Multiple properties with name '{t}.{prop}' found.", serviceProvider, innerException: e); 91 throw new XamlParseException($"Multiple properties with name '{markupExtension.GetType()}.{prop}' found.", serviceProvider, innerException: e); 106 throw new XamlParseException($"Multiple properties with name '{markupExtension.GetType()}.{prop}' found.", serviceProvider, innerException: e);
MarkupExtensions\AppThemeBindingExtension.cs (3)
56 throw new XamlParseException("AppThemeBindingExtension requires a non-null value to be specified for at least one theme or Default.", serviceProvider); 89 throw new XamlParseException($"Multiple properties with name '{bp.DeclaringType}.{bp.PropertyName}' found.", serviceProvider, innerException: e); 99 throw new XamlParseException($"Multiple methods with name '{bp.DeclaringType}.Get{bp.PropertyName}' found.", serviceProvider, innerException: e);
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\DynamicResourceExtension.cs (1)
17 throw new XamlParseException("DynamicResource markup require a Key", serviceProvider);
MarkupExtensions\OnIdiomExtension.cs (3)
41 throw new XamlParseException("OnIdiomExtension requires a non-null value to be specified for at least one idiom or Default.", serviceProvider); 84 throw new XamlParseException($"Multiple properties with name '{bp.DeclaringType}.{bp.PropertyName}' found.", serviceProvider, innerException: e); 94 throw new XamlParseException($"Multiple methods with name '{bp.DeclaringType}.Get{bp.PropertyName}' found.", serviceProvider, innerException: e);
MarkupExtensions\OnPlatformExtension.cs (3)
52 throw new XamlParseException("OnPlatformExtension requires a value to be specified for at least one platform or Default.", serviceProvider); 106 throw new XamlParseException($"Multiple properties with name '{bp.DeclaringType}.{bp.PropertyName}' found.", serviceProvider, innerException: e); 116 throw new XamlParseException($"Multiple methods with name '{bp.DeclaringType}.Get{bp.PropertyName}' found.", serviceProvider, innerException: e);
MarkupExtensions\ReferenceExtension.cs (1)
37 throw new XamlParseException($"Cannot find the object referenced by `{Name}`", serviceProvider);
MarkupExtensions\RelativeSourceExtension.cs (2)
59 throw new XamlParseException( 74 throw new XamlParseException($"Invalid {nameof(Mode)}");
MarkupExtensions\StaticExtension.cs (2)
24 throw new XamlParseException("Syntax for x:Static is [Member=][prefix:]typeName.staticMemberName", serviceProvider); 40 throw new XamlParseException($"No static member found for {Member}", serviceProvider);
MarkupExtensions\StaticResourceExtension.cs (2)
20 throw new XamlParseException("you must specify a key in {StaticResource}", serviceProvider); 28 throw new XamlParseException($"StaticResource not found for key {Key}", xmlLineInfo);
MarkupExtensions\StyleSheetExtension.cs (3)
24 throw new XamlParseException($"StyleSheet cannot have both a Source and a content", serviceProvider); 30 throw new XamlParseException($"Source only accepts Relative URIs", lineInfo); 48 throw new XamlParseException($"StyleSheet require either a Source or a content", serviceProvider);
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);
25 references to XamlParseException
Microsoft.Maui.Controls (1)
Xaml\TypeConversionExtensions.cs (1)
159 exception = e as XamlParseException ?? new XamlParseException($"Type converter failed: {e.Message}", serviceProvider, e);
Microsoft.Maui.Controls.Build.Tasks (6)
ExpandMarkupsVisitor.cs (1)
155 catch (XamlParseException xpe)
NodeILExtensions.cs (1)
170 catch (System.Reflection.TargetInvocationException tie) when (tie.InnerException is XamlParseException)
SetPropertiesVisitor.cs (1)
507 catch (XamlParseException)
XamlCTask.cs (2)
293 } catch (XamlParseException xpe) 314 else if (e is XamlParseException xpe) //shouldn't happen anymore
XmlTypeExtensions.cs (1)
60 catch (XamlParseException)
Microsoft.Maui.Controls.Xaml (18)
ApplyPropertiesVisitor.cs (1)
307 XamlParseException xpe;
CreateValuesVisitor.cs (4)
52 out XamlParseException xpe); 115 catch (TargetInvocationException e) when (e.InnerException is XamlParseException || e.InnerException is XmlException) 143 var xamlpe = e as XamlParseException ?? new XamlParseException("Markup extension failed", serviceProvider, e);
ExpandMarkupsVisitor.cs (3)
85 var ex = new XamlParseException("Expression must end with '}'", xmlLineInfo); 100 var ex = new XamlParseException("Expression did not end in '}'", xmlLineInfo); 194 var ex = new XamlParseException($"MarkupExtension not found for {match}", serviceProvider);
RegisterXNamesVisitor.cs (1)
37 var xpe = new XamlParseException($"An element with the name \"{(string)node.Value}\" already exists in this NameScope", node);
XamlParser.cs (3)
365 out XamlParseException exception) 403 XamlParseException innerexception = null; 406 var t = GetElementType(xmltype, xmlInfo, currentAssembly, out XamlParseException xpe);
XamlServiceProvider.cs (6)
212 var type = Resolve(qualifiedTypeName, serviceProvider, out XamlParseException e); 220 type = Resolve(qualifiedTypeName, null, out XamlParseException exception); 226 XamlParseException exception; 231 Type Resolve(string qualifiedTypeName, IServiceProvider serviceProvider, out XamlParseException exception) 244 internal delegate Type GetTypeFromXmlName(XmlType xmlType, IXmlLineInfo xmlInfo, Assembly currentAssembly, out XamlParseException exception); 333 context.RootElement.GetType().Assembly, out var xpe) is Type parentType