5 instantiations of RelativeBindingSource
Microsoft.Maui.Controls (4)
ContentConverter.cs (2)
69 var source = new RelativeBindingSource(RelativeBindingSourceMode.FindAncestor, typeof(ITextElement)); 88 var source = new RelativeBindingSource(RelativeBindingSourceMode.FindAncestor, typeof(IFontElement));
RelativeBindingSource.cs (2)
59 return _self ?? (_self = new RelativeBindingSource(RelativeBindingSourceMode.Self)); 68 return _templatedParent ?? (_templatedParent = new RelativeBindingSource(RelativeBindingSourceMode.TemplatedParent));
Microsoft.Maui.Controls.Xaml (1)
MarkupExtensions\RelativeSourceExtension.cs (1)
54 return new RelativeBindingSource(actualMode, AncestorType, AncestorLevel);
39 references to RelativeBindingSource
Microsoft.Maui.Controls (31)
Binding.cs (4)
89 if ((value as RelativeBindingSource)?.Mode == RelativeBindingSourceMode.TemplatedParent) 132 if (Source is RelativeBindingSource relativeBindingSource) 155 async void ApplyRelativeSourceBinding(RelativeBindingSource relativeSource, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity) 198 if (Source != null && !(Source is RelativeBindingSource) && fromBindingContextChanged && IsApplied)
ContentConverter.cs (2)
69 var source = new RelativeBindingSource(RelativeBindingSourceMode.FindAncestor, typeof(ITextElement)); 88 var source = new RelativeBindingSource(RelativeBindingSourceMode.FindAncestor, typeof(IFontElement));
ContentPresenter.cs (1)
25 source: RelativeBindingSource.TemplatedParent,
RadioButton\RadioButton.cs (7)
451 border.SetBinding(HorizontalOptionsProperty, static (RadioButton rb) => rb.HorizontalOptions, source: RelativeBindingSource.TemplatedParent); 452 border.SetBinding(VerticalOptionsProperty, static (RadioButton rb) => rb.VerticalOptions, source: RelativeBindingSource.TemplatedParent); 454 border.SetBinding(Border.StrokeProperty, static (RadioButton rb) => rb.BorderColor, source: RelativeBindingSource.TemplatedParent); 455 border.SetBinding(Border.StrokeShapeProperty, static (RadioButton rb) => rb.CornerRadius, source: RelativeBindingSource.TemplatedParent, converter: new CornerRadiusToShape()); 456 border.SetBinding(Border.StrokeThicknessProperty, static (RadioButton rb) => rb.BorderWidth, source: RelativeBindingSource.TemplatedParent); 555 contentPresenter.SetBinding(MarginProperty, static (RadioButton radio) => radio.Padding, BindingMode.OneWay, source: RelativeBindingSource.TemplatedParent); 556 contentPresenter.SetBinding(BackgroundColorProperty, static (RadioButton radio) => radio.BackgroundColor, BindingMode.OneWay, source: RelativeBindingSource.TemplatedParent);
RelativeBindingSource.cs (4)
12 static RelativeBindingSource _self; 13 static RelativeBindingSource _templatedParent; 55 public static RelativeBindingSource Self 64 public static RelativeBindingSource TemplatedParent
TitleBar\TitleBar.cs (11)
372 source: RelativeBindingSource.TemplatedParent); 377 source: RelativeBindingSource.TemplatedParent); 382 source: RelativeBindingSource.TemplatedParent); 397 source: RelativeBindingSource.TemplatedParent); 420 source: RelativeBindingSource.TemplatedParent); 445 source: RelativeBindingSource.TemplatedParent); 450 source: RelativeBindingSource.TemplatedParent); 499 source: RelativeBindingSource.TemplatedParent); 504 source: RelativeBindingSource.TemplatedParent); 523 source: RelativeBindingSource.TemplatedParent); 542 source: RelativeBindingSource.TemplatedParent);
TypedBinding.cs (2)
183 if (Source is RelativeBindingSource relativeSource) 205 RelativeBindingSource relativeSource, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity)
Microsoft.Maui.Controls.Xaml (8)
MarkupExtensions\RelativeSourceExtension.cs (6)
8 public sealed class RelativeSourceExtension : IMarkupExtension<RelativeBindingSource> 28 RelativeBindingSource IMarkupExtension<RelativeBindingSource>.ProvideValue(IServiceProvider serviceProvider) 66 return RelativeBindingSource.Self; 70 return RelativeBindingSource.TemplatedParent; 80 return (this as IMarkupExtension<RelativeBindingSource>).ProvideValue(serviceProvider);
MarkupExtensions\TemplateBindingExtension.cs (2)
40 Source = RelativeBindingSource.TemplatedParent, 54 TypedBinding.Source = RelativeBindingSource.TemplatedParent;