private static void MaskColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { AeroPanel obj = (AeroPanel)d; Color value = (Color)e.NewValue; obj._maskColor = value; }
private static void RenderElementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { AeroPanel obj = (AeroPanel)d; FrameworkElement oldValue = (FrameworkElement)e.OldValue; if (oldValue != null) { oldValue.LayoutUpdated -= obj.RenderElement_LayoutUpdated; } FrameworkElement newValue = (FrameworkElement)e.NewValue; if (newValue != null) { newValue.LayoutUpdated += obj.RenderElement_LayoutUpdated; } }