21 instantiations of SetterSpecificity
Microsoft.Maui.Controls (21)
BindableObject.cs (2)
547 => SetValueCore(property, value, attributes, SetValuePrivateFlags.Default, new SetterSpecificity()); 551 => SetValueCore(property, value, attributes, privateAttributes, new SetterSpecificity());
Element\Element_StyleSheets.cs (1)
68 ((IStyle)sheets[i]).Apply(bo, new SetterSpecificity());
Interactivity\TriggerBase.cs (1)
81 var specificity = new SetterSpecificity(0, manualSpecificity, 0, 0, 0, 0, 0, 0);
MergedStyle.cs (6)
108 ImplicitStyle?.Apply(bindable, new SetterSpecificity(SetterSpecificity.StyleImplicit, 0, 0, 0)); 112 ((IStyle)classStyle)?.Apply(bindable, new SetterSpecificity(SetterSpecificity.StyleLocal, 0, 1, 0)); 114 Style?.Apply(bindable, new SetterSpecificity(SetterSpecificity.StyleLocal, 0, 0, 0)); 207 ImplicitStyle?.Apply(Target, new SetterSpecificity(SetterSpecificity.StyleImplicit, 0, 0, 0)); 212 ((IStyle)classStyle)?.Apply(Target, new SetterSpecificity(SetterSpecificity.StyleLocal, 0, 1, 0)); 215 Style?.Apply(Target, new SetterSpecificity(SetterSpecificity.StyleLocal, 0, 0, 0));
SetterSpecificity.cs (9)
29 public static readonly SetterSpecificity DefaultValue = new SetterSpecificity(0); 30 public static readonly SetterSpecificity VisualStateSetter = new SetterSpecificity(ExtrasVsm, 0, 0, 0, 0, 0, 0, 0); 31 public static readonly SetterSpecificity FromBinding = new SetterSpecificity(0, 0, 0, 1, 0, 0, 0, 0); 33 public static readonly SetterSpecificity ManualValueSetter = new SetterSpecificity(0, 1, 0, 0, 0, 0, 0, 0); 34 public static readonly SetterSpecificity Trigger = new SetterSpecificity(0, ManualTriggerBaseline, 0, 0, 0, 0, 0, 0); 36 public static readonly SetterSpecificity DynamicResourceSetter = new SetterSpecificity(0, 0, 1, 0, 0, 0, 0, 0); 39 public static readonly SetterSpecificity FromHandler = new SetterSpecificity(0xFF, 0, 0, 0, 0, 0, 0, 0); 182 return new SetterSpecificity( 195 return new SetterSpecificity(_value - 0x0000100000000000);
StyleSheets\Style.cs (2)
75 styleable.ClearValue(property, new SetterSpecificity(SetterSpecificity.StyleImplicit, 0, 0, 0)); 82 styleable.SetValue(property, value, new SetterSpecificity(SetterSpecificity.StyleImplicit, 0, 0, 0));
188 references to SetterSpecificity
Microsoft.Maui.Controls (188)
AppThemeBinding.cs (2)
41 SetterSpecificity specificity; 67 internal override void Apply(object context, BindableObject bindObj, BindableProperty targetProperty, bool fromBindingContextChanged, SetterSpecificity specificity)
BindableObject.cs (42)
41 internal Dictionary<TriggerBase, SetterSpecificity> _triggerSpecificity = new Dictionary<TriggerBase, SetterSpecificity>(); 93 ClearValueCore(property, SetterSpecificity.ManualValueSetter); 96 internal void ClearValue(BindableProperty property, SetterSpecificity specificity) 121 ClearValueCore(propertyKey.BindableProperty, SetterSpecificity.ManualValueSetter); 124 void ClearValueCore(BindableProperty property, SetterSpecificity specificity) 132 if (original.Key == SetterSpecificity.FromHandler) 134 bpcontext.Values.Remove(SetterSpecificity.FromHandler); 228 resultArray[i].IsSet = pair.Key != SetterSpecificity.DefaultValue; 254 return bpcontext.Values.GetSpecificity() != SetterSpecificity.DefaultValue; 268 var specificity = SetterSpecificity.FromBinding; 275 internal void RemoveBinding(BindableProperty property, SetterSpecificity specificity) 289 => SetBinding(targetProperty, binding, binding != null && targetProperty != null && binding.GetRealizedMode(targetProperty) == BindingMode.TwoWay ? SetterSpecificity.FromHandler : SetterSpecificity.FromBinding); 291 internal void SetBinding(BindableProperty targetProperty, BindingBase binding, SetterSpecificity specificity) 305 var currentSpecificity = context.Values.GetSpecificity(); 306 if (currentSpecificity > SetterSpecificity.FromBinding) 311 context.Values[SetterSpecificity.FromBinding] = currentValue; 315 SetterSpecificity oldSpecificity = default; 349 if (bpContext != null && bpContext.Values.GetSpecificity() >= SetterSpecificity.ManualValueSetter) 439 internal virtual void OnSetDynamicResource(BindableProperty property, string key, SetterSpecificity specificity) 444 => RemoveDynamicResource(property, SetterSpecificity.DynamicResourceSetter); 446 internal void RemoveDynamicResource(BindableProperty property, SetterSpecificity specificity) 457 => SetDynamicResource(property, key, SetterSpecificity.DynamicResourceSetter); 460 => SetDynamicResource(property, key, SetterSpecificity.DynamicResourceSetter); 463 internal void SetDynamicResource(BindableProperty property, string key, SetterSpecificity specificity) 496 SetValueCore(property, value, SetValueFlags.ClearOneWayBindings | SetValueFlags.ClearDynamicResource, SetValuePrivateFlags.Default, SetterSpecificity.ManualValueSetter); 511 SetValueCore(propertyKey.BindableProperty, value, SetValueFlags.ClearOneWayBindings | SetValueFlags.ClearDynamicResource, SetValuePrivateFlags.Default, SetterSpecificity.ManualValueSetter); 514 internal void SetValue(BindableProperty property, object value, SetterSpecificity specificity) 528 internal void SetValue(BindablePropertyKey propertyKey, object value, SetterSpecificity specificity) 553 internal void SetValueCore(BindableProperty property, object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes, SetterSpecificity specificity) 610 void SetValueActual(BindableProperty property, BindablePropertyContext context, object value, bool currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity, bool silent = false) 614 var originalSpecificity = specificityAndValue.Key; 617 if (specificity != SetterSpecificity.FromHandler 618 && originalSpecificity == SetterSpecificity.FromHandler) 620 context.Values.Remove(SetterSpecificity.FromHandler); 714 var specificity = kvp.Key; 743 context.Values[SetterSpecificity.DefaultValue] = defaultValueCreator != null ? defaultValueCreator(this) : property.DefaultValue; 758 void RemoveBinding(BindableProperty property, BindablePropertyContext context, SetterSpecificity specificity) 872 public readonly SetterSpecificity Specificity; 874 public SetValueArgs(BindableProperty property, BindablePropertyContext context, object value, bool currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity)
BindableObjectExtensions.cs (1)
28 self.SetValue(property, value, SetterSpecificity.FromHandler);
Binding.cs (2)
121 internal override void Apply(object context, BindableObject bindObj, BindableProperty targetProperty, bool fromBindingContextChanged, SetterSpecificity specificity) 155 async void ApplyRelativeSourceBinding(RelativeBindingSource relativeSource, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity)
BindingBase.cs (1)
131 internal virtual void Apply(object context, BindableObject bindObj, BindableProperty targetProperty, bool fromBindingContextChanged, SetterSpecificity specificity)
BindingExpression.cs (4)
31 SetterSpecificity _specificity; 66 internal void Apply(object sourceObject, BindableObject target, BindableProperty property, SetterSpecificity specificity) 121 void ApplyCore(object sourceObject, BindableObject target, BindableProperty property, bool fromTarget, SetterSpecificity specificity) 526 binding.Apply(null, target, _targetProperty, false, SetterSpecificity.FromBinding);
CheckBox\CheckBox.cs (1)
80 set => SetValue(IsCheckedProperty, value, SetterSpecificity.FromHandler);
Compatibility\Handlers\ListView\iOS\EntryCellRenderer.cs (1)
99 .SetValue(EntryCell.TextProperty, cell.TextField.Text, specificity: SetterSpecificity.FromHandler);
DatePicker\DatePicker.cs (2)
234 set => SetValue(DateProperty, value, SetterSpecificity.FromHandler); 240 set => SetValue(FormatProperty, value, SetterSpecificity.FromHandler);
Element\Element.cs (11)
63 Dictionary<BindableProperty, (string, SetterSpecificity)> _dynamicResources; 369 Dictionary<BindableProperty, (string, SetterSpecificity)> DynamicResources => _dynamicResources ?? (_dynamicResources = new Dictionary<BindableProperty, (string, SetterSpecificity)>()); 483 SetValue(property, value, specificity: SetterSpecificity.FromHandler); 490 SetValue(property, value, specificity: SetterSpecificity.FromHandler); 761 List<(BindableProperty, SetterSpecificity)> changedResources = null; 762 foreach (KeyValuePair<BindableProperty, (string, SetterSpecificity)> dynR in DynamicResources) 770 changedResources = changedResources ?? new List<(BindableProperty, SetterSpecificity)>(); 775 foreach ((BindableProperty, SetterSpecificity) changedResource in changedResources) 788 internal override void OnSetDynamicResource(BindableProperty property, string key, SetterSpecificity specificity) 920 void OnResourceChanged(BindableProperty property, object value, SetterSpecificity specificity)
IndicatorView\IndicatorView.cs (1)
194 set => SetValue(PositionProperty, value, SetterSpecificity.FromHandler);
InputView\InputView.cs (3)
260 set => SetValue(SelectionLengthProperty, value, SetterSpecificity.FromHandler); 266 set => SetValue(CursorPositionProperty, value, SetterSpecificity.FromHandler); 272 set => SetValue(TextProperty, value, SetterSpecificity.FromHandler);
Interactivity\BindingCondition.cs (1)
72 bindable.ClearValue(_boundProperty, SetterSpecificity.FromBinding);
Interactivity\TriggerBase.cs (3)
80 var manualSpecificity = (ushort)(SetterSpecificity.ManualTriggerBaseline + triggerIndex); 81 var specificity = new SetterSpecificity(0, manualSpecificity, 0, 0, 0, 0, 0, 0); 109 if (!bindable._triggerSpecificity.TryGetValue(this, out var specificity))
IStyle.cs (1)
10 void Apply(BindableObject bindable, SetterSpecificity specificity);
ListView\ListView.cs (2)
524 SetValueCore(SelectedItemProperty, cell?.BindingContext, SetValueFlags.ClearOneWayBindings | SetValueFlags.ClearDynamicResource | (changed ? SetValueFlags.RaiseOnEqual : 0), SetValuePrivateFlags.Default, SetterSpecificity.FromHandler); 550 SetValueCore(SelectedItemProperty, cell?.BindingContext, SetValueFlags.ClearOneWayBindings | SetValueFlags.ClearDynamicResource | (changed ? SetValueFlags.RaiseOnEqual : 0), SetValuePrivateFlags.Default, SetterSpecificity.FromHandler);
MergedStyle.cs (8)
76 Target.OnSetDynamicResource(classStyleProperty, Maui.Controls.Style.StyleClassPrefix + styleClass, SetterSpecificity.DefaultValue); 100 public void Apply(BindableObject bindable, SetterSpecificity specificity) 108 ImplicitStyle?.Apply(bindable, new SetterSpecificity(SetterSpecificity.StyleImplicit, 0, 0, 0)); 112 ((IStyle)classStyle)?.Apply(bindable, new SetterSpecificity(SetterSpecificity.StyleLocal, 0, 1, 0)); 114 Style?.Apply(bindable, new SetterSpecificity(SetterSpecificity.StyleLocal, 0, 0, 0)); 207 ImplicitStyle?.Apply(Target, new SetterSpecificity(SetterSpecificity.StyleImplicit, 0, 0, 0)); 212 ((IStyle)classStyle)?.Apply(Target, new SetterSpecificity(SetterSpecificity.StyleLocal, 0, 1, 0)); 215 Style?.Apply(Target, new SetterSpecificity(SetterSpecificity.StyleLocal, 0, 0, 0));
MultiBinding.cs (2)
108 _targetObject.SetValueCore(_targetProperty, value, SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted, specificity: SetterSpecificity.FromBinding); 136 internal override void Apply(object context, BindableObject targetObject, BindableProperty targetProperty, bool fromBindingContextChanged, SetterSpecificity specificity)
Picker\Picker.cs (8)
230 ItemDisplayBinding.Apply(item, this, s_displayProperty, false, SetterSpecificity.FromBinding); 372 SetValue(SelectedIndexProperty, newIndex, SetterSpecificity.FromHandler); 384 SetValue(SelectedIndexProperty, ItemsSource.IndexOf(selectedItem), SetterSpecificity.FromHandler); 387 SetValue(SelectedIndexProperty, Items.IndexOf(selectedItem), SetterSpecificity.FromHandler); 396 SetValue(SelectedItemProperty, null, SetterSpecificity.FromHandler); 403 SetValue(SelectedItemProperty, item, SetterSpecificity.FromHandler); 407 SetValue(SelectedItemProperty, Items[index], SetterSpecificity.FromHandler); 437 set => SetValue(SelectedIndexProperty, value, SetterSpecificity.FromHandler);
RadioButton\RadioButton.cs (4)
365 SetValue(IsCheckedProperty, true, specificity: SetterSpecificity.FromHandler); 428 SetValue(IsCheckedProperty, false, specificity: SetterSpecificity.FromHandler); 438 SetValue(IsCheckedProperty, true, specificity: SetterSpecificity.FromHandler); 670 set => SetValue(IsCheckedProperty, value, SetterSpecificity.FromHandler);
RadioButton\RadioButtonGroupController.cs (1)
109 radioButton.SetValue(RadioButton.IsCheckedProperty, true, specificity: SetterSpecificity.FromHandler);
RefreshView\RefreshView.cs (1)
148 set { SetValue(IsRefreshingProperty, value, SetterSpecificity.FromHandler); }
RelativeBindingSource.cs (4)
74 internal async Task Apply(BindingExpression expression, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity) 80 internal async Task Apply(TypedBindingBase binding, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity) 203 SetterSpecificity specificity) 220 SetterSpecificity specificity)
Setter.cs (2)
64 internal void Apply(BindableObject target, SetterSpecificity specificity) 87 internal void UnApply(BindableObject target, SetterSpecificity specificity)
SetterSpecificity.cs (22)
29 public static readonly SetterSpecificity DefaultValue = new SetterSpecificity(0); 30 public static readonly SetterSpecificity VisualStateSetter = new SetterSpecificity(ExtrasVsm, 0, 0, 0, 0, 0, 0, 0); 31 public static readonly SetterSpecificity FromBinding = new SetterSpecificity(0, 0, 0, 1, 0, 0, 0, 0); 33 public static readonly SetterSpecificity ManualValueSetter = new SetterSpecificity(0, 1, 0, 0, 0, 0, 0, 0); 34 public static readonly SetterSpecificity Trigger = new SetterSpecificity(0, ManualTriggerBaseline, 0, 0, 0, 0, 0, 0); 36 public static readonly SetterSpecificity DynamicResourceSetter = new SetterSpecificity(0, 0, 1, 0, 0, 0, 0, 0); 39 public static readonly SetterSpecificity FromHandler = new SetterSpecificity(0xFF, 0, 0, 0, 0, 0, 0, 0); 180 public SetterSpecificity CopyStyle(byte extras, ushort manual, byte isDynamicResource, byte isBinding) 193 public SetterSpecificity AsBaseStyle() 198 public override bool Equals(object obj) => obj is SetterSpecificity s && s._value == _value; 201 public static bool operator <(SetterSpecificity left, SetterSpecificity right) => left._value < right._value; 202 public static bool operator >(SetterSpecificity left, SetterSpecificity right) => left._value > right._value; 203 public static bool operator >=(SetterSpecificity left, SetterSpecificity right) => left._value >= right._value; 204 public static bool operator <=(SetterSpecificity left, SetterSpecificity right) => left._value <= right._value; 205 public static bool operator ==(SetterSpecificity left, SetterSpecificity right) => left._value == right._value; 206 public static bool operator !=(SetterSpecificity left, SetterSpecificity right) => left._value != right._value;
SetterSpecificityList.cs (17)
16 SetterSpecificity[] _keys; 22 public T this[SetterSpecificity key] 30 _keys = Array.Empty<SetterSpecificity>(); 38 _keys = Array.Empty<SetterSpecificity>(); 43 _keys = new SetterSpecificity[initialCapacity]; 52 public SetterSpecificity GetSpecificity() 80 public T GetClearedValue(SetterSpecificity specificity) 93 public SetterSpecificity GetClearedSpecificity() 103 public KeyValuePair<SetterSpecificity, T> GetSpecificityAndValue() 106 return index < 0 ? default : new KeyValuePair<SetterSpecificity, T>(_keys[index], _values[index]); 110 void SetValue(SetterSpecificity key, T value) 119 var indexSpecificity = _keys[index]; 154 T GetValue(SetterSpecificity key) 163 var indexSpecificity = _keys[index]; 182 public void Remove(SetterSpecificity key) 191 var indexSpecificity = _keys[index]; 224 var newKeys = new SetterSpecificity[capacity];
Shell\SearchHandler.cs (2)
59 SetValue(IsFocusedPropertyKey, value, specificity: SetterSpecificity.FromHandler); 300 SetValue(SelectedItemPropertyKey, obj, specificity: SetterSpecificity.FromHandler);
Shell\ShellItem.cs (1)
274 ClearValue(CurrentItemProperty, specificity: SetterSpecificity.FromHandler);
Shell\ShellSection.cs (1)
710 ClearValue(CurrentItemProperty, specificity: SetterSpecificity.FromHandler);
Style.cs (5)
93 void IStyle.Apply(BindableObject bindable, SetterSpecificity specificity) 143 ApplyCore(target.Key, newValue, (SetterSpecificity)target.Value); 158 style.ApplyCore(bindable, (Style)newValue, (SetterSpecificity)objectspecificity); 163 void ApplyCore(BindableObject bindable, Style basedOn, SetterSpecificity specificity) 191 setter.UnApply(bindable, (SetterSpecificity)specificity);
StyleSheets\Style.cs (2)
75 styleable.ClearValue(property, new SetterSpecificity(SetterSpecificity.StyleImplicit, 0, 0, 0)); 82 styleable.SetValue(property, value, new SetterSpecificity(SetterSpecificity.StyleImplicit, 0, 0, 0));
StyleSheets\StyleSheet.cs (1)
97 void IStyle.Apply(BindableObject bindable, SetterSpecificity setterspecificity)
Switch\Switch.cs (1)
108 set => SetValue(IsToggledProperty, value, SetterSpecificity.FromHandler);
TemplateBinding.cs (2)
88 internal override async void Apply(object newContext, BindableObject bindObj, BindableProperty targetProperty, bool fromBindingContextChanged, SetterSpecificity specificity) 139 _expression?.Apply(templatedParent, bindableObject, targetProperty, SetterSpecificity.FromBinding);
TimePicker\TimePicker.cs (1)
161 set => SetValue(TimeProperty, value, SetterSpecificity.FromHandler);
TypedBinding.cs (7)
70 internal abstract void ApplyToResolvedSource(object sourceObject, BindableObject target, BindableProperty property, bool fromTarget, SetterSpecificity specificity); 145 SetterSpecificity _specificity; 171 internal override void Apply(object context, BindableObject bindObj, BindableProperty targetProperty, bool fromBindingContextChanged, SetterSpecificity specificity) 205 RelativeBindingSource relativeSource, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity) 234 internal override void ApplyToResolvedSource(object source, BindableObject target, BindableProperty targetProperty, bool fromBindingContextChanged, SetterSpecificity specificity) 288 internal void ApplyCore(object sourceObject, BindableObject target, BindableProperty property, bool fromTarget, SetterSpecificity specificity) 420 Apply(null, target, _targetProperty, false, SetterSpecificity.FromBinding);
VisualElement\VisualElement.cs (1)
1964 set => SetValue(IsFocusedPropertyKey, value, SetterSpecificity.FromHandler);
VisualStateManager.cs (5)
34 var vsgSpecificity = oldVisualStateGroupList.Specificity; 35 var specificity = vsgSpecificity.CopyStyle(1, 0, 0, 0); 80 var vsgSpecificity = vsgSpecificityValue.Key; 83 var specificity = vsgSpecificity.CopyStyle(1, 0, 0, 0); 342 internal SetterSpecificity Specificity { get; set; }
Window\Window.cs (4)
223 SetValue(XProperty, frame.X, SetterSpecificity.FromHandler); 224 SetValue(YProperty, frame.Y, SetterSpecificity.FromHandler); 225 SetValue(WidthProperty, frame.Width, SetterSpecificity.FromHandler); 226 SetValue(HeightProperty, frame.Height, SetterSpecificity.FromHandler);
Xaml\Diagnostics\BindablePropertyDiagnostics.cs (8)
18 var specificity = context.Values.GetSpecificityAndValue().Key; 19 if (specificity == SetterSpecificity.DefaultValue) 21 if (specificity == SetterSpecificity.FromBinding) 23 if (specificity == SetterSpecificity.ManualValueSetter) 25 if (specificity == SetterSpecificity.DynamicResourceSetter) 27 if (specificity == SetterSpecificity.VisualStateSetter) 29 if (specificity == SetterSpecificity.Trigger) 31 if (specificity == SetterSpecificity.FromHandler)