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);
48 references to RelativeBindingSource
Microsoft.Maui.Controls (40)
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 (16)
448 border.SetBinding(BackgroundColorProperty, static (RadioButton rb) => rb.BackgroundColor, source: RelativeBindingSource.TemplatedParent); 449 border.SetBinding(HorizontalOptionsProperty, static (RadioButton rb) => rb.HorizontalOptions, source: RelativeBindingSource.TemplatedParent); 450 border.SetBinding(MarginProperty, static (RadioButton rb) => rb.Margin, source: RelativeBindingSource.TemplatedParent); 451 border.SetBinding(OpacityProperty, static (RadioButton rb) => rb.Opacity, source: RelativeBindingSource.TemplatedParent); 452 border.SetBinding(RotationProperty, static (RadioButton rb) => rb.Rotation, source: RelativeBindingSource.TemplatedParent); 453 border.SetBinding(ScaleProperty, static (RadioButton rb) => rb.Scale, source: RelativeBindingSource.TemplatedParent); 454 border.SetBinding(ScaleXProperty, static (RadioButton rb) => rb.ScaleX, source: RelativeBindingSource.TemplatedParent); 455 border.SetBinding(ScaleYProperty, static (RadioButton rb) => rb.ScaleY, source: RelativeBindingSource.TemplatedParent); 456 border.SetBinding(TranslationYProperty, static (RadioButton rb) => rb.TranslationY, source: RelativeBindingSource.TemplatedParent); 457 border.SetBinding(TranslationXProperty, static (RadioButton rb) => rb.TranslationX, source: RelativeBindingSource.TemplatedParent); 458 border.SetBinding(VerticalOptionsProperty, static (RadioButton rb) => rb.VerticalOptions, source: RelativeBindingSource.TemplatedParent); 460 border.SetBinding(Border.StrokeProperty, static (RadioButton rb) => rb.BorderColor, source: RelativeBindingSource.TemplatedParent); 461 border.SetBinding(Border.StrokeShapeProperty, static (RadioButton rb) => rb.CornerRadius, source: RelativeBindingSource.TemplatedParent, converter: new CornerRadiusToShape()); 462 border.SetBinding(Border.StrokeThicknessProperty, static (RadioButton rb) => rb.BorderWidth, source: RelativeBindingSource.TemplatedParent); 561 contentPresenter.SetBinding(MarginProperty, static (RadioButton radio) => radio.Padding, BindingMode.OneWay, source: RelativeBindingSource.TemplatedParent); 562 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)
358 source: RelativeBindingSource.TemplatedParent); 363 source: RelativeBindingSource.TemplatedParent); 368 source: RelativeBindingSource.TemplatedParent); 383 source: RelativeBindingSource.TemplatedParent); 406 source: RelativeBindingSource.TemplatedParent); 431 source: RelativeBindingSource.TemplatedParent); 436 source: RelativeBindingSource.TemplatedParent); 485 source: RelativeBindingSource.TemplatedParent); 490 source: RelativeBindingSource.TemplatedParent); 509 source: RelativeBindingSource.TemplatedParent); 528 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;