static ScopedStoryboard() { var windowsBase = Assembly.LoadFile(@"C:\Windows\Microsoft.NET\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll"); var type = windowsBase.DefinedTypes.Single(t => t.Name == "FreezableDefaultValueFactory"); var ctors = type.GetConstructors(BindingFlags.NonPublic | BindingFlags.Instance); var paramPropertyReference = typeof(TimelineCollection).GetProperty("Empty", BindingFlags.Static | BindingFlags.GetProperty | BindingFlags.NonPublic); var propertyValue = paramPropertyReference.GetValue(null).As <TimelineCollection>(); var defaultValue = ctors.First().Invoke(new[] { (Freezable)propertyValue }); ChildrenProperty.OverrideMetadata(typeof(ScopedStoryboard), new FrameworkPropertyMetadata(defaultValue, onChildrenPropertyChanged)); }
set => this.SetValue(ChildrenProperty, value);
set => SetValue(ChildrenProperty, value);
set { SetValue(ChildrenProperty, value); }
get => (UIElementCollection)GetValue(ChildrenProperty); private set => SetValue(ChildrenProperty, value);