private static void ValuePropertyChanged(ControlPropertyChangedEventArgs args) { if (!((InputControlBase)args.Target).SettingValueFromRaw) { args.Target.SetValue(RawValueProperty, args.NewValue); } }
private static void IsSelectedPropertyChanged(ControlPropertyChangedEventArgs args) { var targetItem = args.Target as ListItemBase; if (targetItem != null && targetItem._parent != null) { targetItem._parent.NotifyItemSelectedPropertyChanged(targetItem, (bool)args.NewValue); } }
private static void RawValuePropertyChanged(ControlPropertyChangedEventArgs args) { var target = args.Target as InputValueControlBase; var strValue = target.ConvertRawValueInternal(args.NewValue); ((InputControlBase)args.Target).SettingValueFromRaw = true; args.Target.SetValue(ValueProperty, strValue); ((InputControlBase)args.Target).SettingValueFromRaw = false; }
private static void RawValuePropertyChanged(ControlPropertyChangedEventArgs args) { var target = args.Target as InputValueControlBase; var strValue = target.ConvertRawValueInternal(args.NewValue); ((InputControlBase)args.Target).SettingValueFromRaw = true; args.Target.SetValue(ValueProperty, strValue); ((InputControlBase)args.Target).SettingValueFromRaw = false; }
private static void SelectedItemPropertyChanged(ControlPropertyChangedEventArgs args) { var target = args.Target as TConcreteType; if (target != null) { var value = args.NewValue as TItemType; target.UnselectAll(value); if (value != null) { if (!target.Children.Contains(value)) { target.Children.Add(value); } value.IsSelected = true; } } }
private static void SelectedValuePropertyChanged(ControlPropertyChangedEventArgs args) { var target = args.Target as TConcreteType; if (target != null) { target.UnselectAll(); var value = args.NewValue.AsString(); if (!String.IsNullOrEmpty(value)) { foreach (var item in target.Children) { if (item.Value != null && item.Value.Equals(value)) { item.IsSelected = true; } } } } }
private static void ValuePropertyChanged(ControlPropertyChangedEventArgs args) { if (!((InputControlBase)args.Target).SettingValueFromRaw) args.Target.SetValue(RawValueProperty, args.NewValue); }
private static void IsSelectedPropertyChanged(ControlPropertyChangedEventArgs args) { var targetItem = args.Target as ListItemBase; if (targetItem != null && targetItem._parent != null) targetItem._parent.NotifyItemSelectedPropertyChanged(targetItem, (bool)args.NewValue); }