2 implementations of INameScope
Microsoft.Maui.Controls (2)
Element\Element.cs (1)
49
public abstract partial class Element : BindableObject, IElementDefinition,
INameScope
, IElementController, IVisualTreeElement, Maui.IElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IControlsElement, IHandlerDisconnectPolicies
Internals\NameScope.cs (1)
11
public class NameScope :
INameScope
32 references to INameScope
Microsoft.Maui.Controls (23)
Element\Element.cs (8)
508
public
INameScope
transientNamescope;
517
var
namescope = GetNameScope() ?? transientNamescope;
524
void
INameScope
.RegisterName(string name, object scopedElement)
526
var
namescope = GetNameScope() ?? throw new InvalidOperationException("this element is not in a namescope");
531
void
INameScope
.UnregisterName(string name)
533
var
namescope = GetNameScope() ?? throw new InvalidOperationException("this element is not in a namescope");
896
internal
INameScope
GetNameScope()
901
var
ns = NameScope.GetNameScope(element);
Internals\NameScope.cs (8)
15
BindableProperty.CreateAttached("NameScope", typeof(
INameScope
), typeof(NameScope), default(
INameScope
));
20
object
INameScope
.FindByName(string name)
23
void
INameScope
.RegisterName(string name, object scopedElement)
38
public static
INameScope
GetNameScope(BindableObject bindable) => (
INameScope
)bindable.GetValue(NameScopeProperty);
41
public static void SetNameScope(BindableObject bindable,
INameScope
value)
47
void
INameScope
.UnregisterName(string name)
LegacyLayouts\ConstraintExpression.cs (2)
61
if (valueProvider == null || !(valueProvider.TargetObject is
INameScope
))
63
view = ((
INameScope
)valueProvider.TargetObject).FindByName<View>(ElementName);
NameScopeExtensions.cs (1)
23
internal static T FindByName<T>(this
INameScope
namescope, string name)
RadioButton\RadioButton.cs (1)
570
INameScope
nameScope = new NameScope();
ReferenceTypeConverter.cs (1)
37
if (!(target is
INameScope
ns))
Shell\BaseShellItem.cs (1)
521
INameScope
nameScope = new NameScope();
TitleBar\TitleBar.cs (1)
535
INameScope
nameScope = new NameScope();
Microsoft.Maui.Controls.Xaml (9)
CreateValuesVisitor.cs (1)
184
if (NameScope.GetNameScope(bindable) is
INameScope
existingNs)
MarkupExtensions\ReferenceExtension.cs (1)
30
if (!(NameScope.GetNameScope(bo) is
INameScope
ns))
XamlNode.cs (1)
41
public
INameScope
NameScope { get; set; }
XamlServiceProvider.cs (6)
142
readonly
INameScope
[] scopes;
145
public SimpleValueTargetProvider(object[] objectAndParents, object targetProperty,
INameScope
scope)
146
: this(objectAndParents, targetProperty, new
INameScope
[] { scope }, false)
150
public SimpleValueTargetProvider(object[] objectAndParents, object targetProperty,
INameScope
[] scopes, bool notused)
170
foreach (
var
scope in scopes)
178
if (!(NameScope.GetNameScope(bo) is
INameScope
ns))