/// <summary> /// Gets the sounds. /// </summary> /// <param name="obj">The object.</param> /// <returns></returns> public static SoundSourceCollection GetSounds(DependencyObject obj) { var collection = (SoundSourceCollection)obj.GetValue(SoundsProperty); if (collection == null) { collection = new SoundSourceCollection(); obj.SetValue(SoundsProperty, collection); } return(collection); }
/// <summary> /// Sets the sounds. /// </summary> /// <param name="obj">The object.</param> /// <param name="value">The value.</param> public static void SetSounds(DependencyObject obj, SoundSourceCollection value) { obj.SetValue(SoundsProperty, value); }