1 implementation of Parent
Microsoft.Maui.Controls.Xaml (1)
XamlNode.cs (1)
98 public INode Parent { get; set; }
7 writes to Parent
Microsoft.Maui.Controls.Build.Tasks (2)
ExpandMarkupsVisitor.cs (1)
52 node.Accept(new XamlNodeVisitor((n, parent) => n.Parent = parent), parentNode);
XamlCTask.cs (1)
434 rootnode.Accept(new XamlNodeVisitor((node, parent) => node.Parent = parent), null);
Microsoft.Maui.Controls.Xaml (5)
ApplyPropertiesVisitor.cs (1)
791 cnode.Accept(new XamlNodeVisitor((n, parent) => n.Parent = parent), node.Parent); //set parents for {StaticResource}
ExpandMarkupsVisitor.cs (2)
61 node.Parent = parentNode; 210 childnode.Parent = _node;
XamlLoader.cs (2)
188 resources.Accept(new XamlNodeVisitor((node, parent) => node.Parent = parent), null); //set parents for {StaticResource} 206 rootnode.Accept(new XamlNodeVisitor((node, parent) => node.Parent = parent), null); //set parents for {StaticResource}
50 references to Parent
Microsoft.Maui.Controls.Build.Tasks (30)
CompiledConverters\BindablePropertyConverter.cs (12)
36 var parent = node.Parent?.Parent as IElementNode ?? (node.Parent?.Parent as IListNode)?.Parent as IElementNode; 89 if (!(parent.Parent is IElementNode target) || target.XmlType.NamespaceUri != XamlParser.MauiUri || target.XmlType.Name != nameof(VisualStateGroup)) 90 throw new XamlParseException($"Expected {nameof(VisualStateGroup)} but found {parent.Parent}", lineInfo); 93 if (target.Parent is ListNode 94 || ((target.Parent as IElementNode)?.XmlType.NamespaceUri == XamlParser.MauiUri 95 && (target.Parent as IElementNode)?.XmlType.Name == nameof(VisualStateGroupList))) 96 target = target.Parent.Parent as IElementNode; 98 target = target.Parent as IElementNode; 102 return ((target?.Parent as IElementNode)?.Properties[new XmlName("", "TargetType")] as ValueNode)?.Value as string;
CompiledConverters\RDSourceTypeConverter.cs (1)
22 rootNode = rootNode.Parent;
CompiledMarkupExtensions\StaticResourceExtension.cs (4)
114 SetPropertiesVisitor.TryGetPropertyName(node, node.Parent, out propertyName); 116 var parentType = module.ImportReference((node.Parent as IElementNode).XmlType.GetTypeReference(context.Cache, module, (IXmlLineInfo)node)); 159 SetPropertiesVisitor.TryGetPropertyName(node, node.Parent, out var propertyName); 171 if (node.Parent is IElementNode parentNode && propertyName != XmlName.Empty)
CompiledValueProviders\StyleSheetProvider.cs (1)
53 rootNode = rootNode.Parent;
NodeILExtensions.cs (4)
472 INode n = node.Parent; 478 n = n.Parent; 587 node = node.Parent; 673 if (node.Parent is IElementNode elementNode &&
SetPropertiesVisitor.cs (4)
92 parentNode = parentNode.Parent; 180 var parent = Context.Variables[((IElementNode)parentNode.Parent)]; 578 { Parent: ListNode { Parent: IElementNode parentNode } } => parentNode, 579 { Parent: IElementNode parentNode } => parentNode,
SetResourcesVisitor.cs (4)
57 && IsResourceDictionary((IElementNode)parentNode.Parent) 58 && !((IElementNode)parentNode.Parent).Properties.ContainsKey(XmlName.xKey)) 89 && IsResourceDictionary((IElementNode)parentNode.Parent) 90 && !((IElementNode)parentNode.Parent).Properties.ContainsKey(XmlName.xKey))
Microsoft.Maui.Controls.Xaml (20)
ApplyPropertiesVisitor.cs (3)
108 parentNode = parentNode.Parent; 192 if (!Values.TryGetValue(parentNode.Parent, out var source) && Context.ExceptionHandler != null) 791 cnode.Accept(new XamlNodeVisitor((n, parent) => n.Parent = parent), node.Parent); //set parents for {StaticResource}
FillResourceDictionariesVisitor.cs (4)
64 && typeof(ResourceDictionary).IsAssignableFrom(Context.Types[((IElementNode)parentNode.Parent)]) 65 && !((IElementNode)parentNode.Parent).Properties.ContainsKey(XmlName.xKey)) 87 && typeof(ResourceDictionary).IsAssignableFrom(Context.Types[((IElementNode)parentNode.Parent)]) 88 && !((IElementNode)parentNode.Parent).Properties.ContainsKey(XmlName.xKey))
XamlNode.cs (1)
291 node = node.Parent;
XamlServiceProvider.cs (12)
24 if (context != null && node != null && node.Parent != null && context.Values.TryGetValue(node.Parent, out object targetObject)) 104 while (n.Parent != null && context != null) 106 if (n.Parent is IElementNode) 108 if (context.Values.TryGetValue(n.Parent, out var obj)) 116 n = n.Parent; 274 n = n.Parent; 312 { Parent: ListNode { Parent: IElementNode parentNode } } => parentNode, 313 { Parent: IElementNode parentNode } => parentNode, 320 if (node.TryGetPropertyName(node.Parent, out XmlName name) 329 if (node.TryGetPropertyName(node.Parent, out XmlName name) 330 && node.Parent is IElementNode parent