本文整理汇总了C#中DependencyPropertyChangedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# DependencyPropertyChangedEventArgs类的具体用法?C# DependencyPropertyChangedEventArgs怎么用?C# DependencyPropertyChangedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DependencyPropertyChangedEventArgs类属于命名空间,在下文中一共展示了DependencyPropertyChangedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnAxisLabelStylePropertyChanged
/// <summary>
/// AxisLabelStyleProperty property changed handler.
/// </summary>
/// <param name="d">DisplayAxis that changed its AxisLabelStyle.</param>
/// <param name="e">Event arguments.</param>
private static void OnAxisLabelStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DisplayAxis source = (DisplayAxis)d;
Style oldValue = (Style)e.OldValue;
Style newValue = (Style)e.NewValue;
source.OnAxisLabelStylePropertyChanged(oldValue, newValue);
}
示例2: OnRatioVisibleChanged
/// <summary>
/// RatioVisibleProperty property changed handler.
/// </summary>
/// <param name="d">PartialView that changed its RatioVisible.</param>
/// <param name="e">Event arguments.</param>
private static void OnRatioVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
Clipper source = (Clipper)d;
double oldValue = (double)e.OldValue;
double newValue = (double)e.NewValue;
source.OnRatioVisibleChanged(oldValue, newValue);
}
示例3: OnTriggersChanged
private static void OnTriggersChanged(IDependencyObject obj, DependencyPropertyChangedEventArgs args)
{
var triggerCollection1 = args.OldValue as TriggerCollection;
var triggerCollection2 = args.NewValue as TriggerCollection;
if (triggerCollection1 == triggerCollection2)
{
return;
}
if (triggerCollection1 != null && triggerCollection1.AssociatedObject != null)
{
triggerCollection1.Detach();
}
if (triggerCollection2 == null || obj == null)
{
return;
}
if (triggerCollection2.AssociatedObject != null)
{
throw new InvalidOperationException("Cannot attach TriggerCollection multiple imes");
}
var fElement = obj as FormElement;
if (fElement == null)
{
throw new InvalidOperationException("Can only host TriggerCollection on FormElement");
}
triggerCollection2.Attach(fElement);
}
示例4: MatrixPropertyChanged
//------------------------------------------------------
//
// Public Properties
//
//------------------------------------------------------
private static void MatrixPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
MatrixTransform3D target = ((MatrixTransform3D) d);
target.PropertyChanged(MatrixProperty);
}
示例5: OnLocationPropertyChanged
/// <summary>
/// LocationProperty property changed handler.
/// </summary>
/// <param name="d">Axis that changed its Location.</param>
/// <param name="e">Event arguments.</param>
private static void OnLocationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
Axis source = (Axis)d;
AxisLocation oldValue = (AxisLocation)e.OldValue;
AxisLocation newValue = (AxisLocation)e.NewValue;
source.OnLocationPropertyChanged(oldValue, newValue);
}
示例6: OnOtherContentTemplatePropertyChanged
private static void OnOtherContentTemplatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var panControl = d as PanControl;
if (panControl == null) return;
panControl.OnOtherContentTemplateChanged((DataTemplate)e.OldValue, (DataTemplate)e.NewValue);
}
示例7: ColorPropertyChanged
//------------------------------------------------------
//
// Public Properties
//
//------------------------------------------------------
private static void ColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
EmissiveMaterial target = ((EmissiveMaterial) d);
target.PropertyChanged(ColorProperty);
}
示例8: OnAttachChanged
private static void OnAttachChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
Action<System.Windows.Interactivity.TriggerBase> action = null;
System.Windows.Interactivity.TriggerCollection allTriggers;
if (e.NewValue != e.OldValue)
{
System.Windows.Interactivity.TriggerBase[] enumerable = (System.Windows.Interactivity.TriggerBase[]) d.GetValue(MessageTriggersProperty);
allTriggers = Interaction.GetTriggers(d);
if (enumerable != null)
{
if (action == null)
{
action = (Action<System.Windows.Interactivity.TriggerBase>) (x => allTriggers.Remove(x));
}
enumerable.Apply<System.Windows.Interactivity.TriggerBase>(action);
}
System.Windows.Interactivity.TriggerBase[] baseArray2 = Parser.Parse(d, e.NewValue as string).ToArray<System.Windows.Interactivity.TriggerBase>();
baseArray2.Apply<System.Windows.Interactivity.TriggerBase>(new Action<System.Windows.Interactivity.TriggerBase>(allTriggers.Add));
if (baseArray2.Length > 0)
{
d.SetValue(MessageTriggersProperty, baseArray2);
}
else
{
d.ClearValue(MessageTriggersProperty);
}
}
}
示例9: OnSizePropertyChanged
/// <summary>
/// SizeProperty property changed handler.
/// </summary>
/// <param name="d">BubbleDataPoint that changed its Size.</param>
/// <param name="e">Event arguments.</param>
private static void OnSizePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
BubbleDataPoint source = (BubbleDataPoint)d;
double oldValue = (double)e.OldValue;
double newValue = (double)e.NewValue;
source.OnSizePropertyChanged(oldValue, newValue);
}
示例10: ViewMatrixPropertyChanged
//------------------------------------------------------
//
// Public Properties
//
//-----------------------------------------------------
private static void ViewMatrixPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
MatrixCamera target = ((MatrixCamera) d);
target.PropertyChanged(ViewMatrixProperty);
}
示例11: OnIsSelectedChanged
private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
BarPiece source = (BarPiece)d;
bool oldValue = (bool)e.OldValue;
bool newValue = (bool)e.NewValue;
source.OnIsSelectedPropertyChanged(oldValue, newValue);
}
示例12: OnIsDraggingPropertyChanged
/// <summary>
/// IsDraggingProperty property changed handler.
/// </summary>
/// <param name="d">Thumb that changed IsDragging.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnIsDraggingPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
Thumb thumb = d as Thumb;
Debug.Assert(thumb != null);
thumb.OnDraggingChanged();
}
示例13: ColorPropertyChanged
//------------------------------------------------------
//
// Public Properties
//
//------------------------------------------------------
private static void ColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
Light target = ((Light) d);
target.PropertyChanged(ColorProperty);
}
示例14: OnExpandDirectionChanged
/// <summary>
/// ExpandDirectionProperty property changed handler.
/// </summary>
/// <param name="d">ExpandDirectionView that changed its ExpandDirection.</param>
/// <param name="e">Event arguments.</param>
private static void OnExpandDirectionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
LinearClipper source = (LinearClipper)d;
ExpandDirection oldValue = (ExpandDirection)e.OldValue;
ExpandDirection newValue = (ExpandDirection)e.NewValue;
source.OnExpandDirectionChanged(oldValue, newValue);
}
示例15: OnIsSelecedChanged
private static void OnIsSelecedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var control = d as BigTabBarItem;
if (control == null || e.NewValue == null || e.NewValue == e.OldValue) return;
string state = (bool.Parse(e.NewValue.ToString())) ? "Selected" : "Unselected";
VisualStateManager.GoToState(control, state, true);
}