/// <summary> /// Sets the parent container. /// </summary> /// <param name="dependencyObject">The dependency object.</param> /// <param name="value">The value.</param> public static void SetParentContainer(DependencyObject dependencyObject, GridEntryContainer value) { if (dependencyObject == null) { throw new ArgumentNullException("dependencyObject"); } dependencyObject.SetValue(ParentContainerProperty, value); }
public void ShouldResetParentContainerWithNull() { GridEntryContainerMock container = new GridEntryContainerMock(); GridEntryContainer.SetParentContainer(container, container); Assert.AreEqual(container, GridEntryContainer.GetParentContainer(container)); GridEntryContainer.SetParentContainer(container, null); Assert.IsNull(GridEntryContainer.GetParentContainer(container)); }
public void ShouldFailSettingParentContainerForNull() { GridEntryContainer.SetParentContainer(null, new GridEntryContainerMock()); }
public void ShouldFailGettingParentContainerForNull() { GridEntryContainer.GetParentContainer(null); }
/// <summary> /// Sets the parent container. /// </summary> /// <param name="dependencyObject">The dependency object.</param> /// <param name="value">The value.</param> public static void SetParentContainer(DependencyObject dependencyObject, GridEntryContainer value) { if (dependencyObject == null) throw new ArgumentNullException("dependencyObject"); dependencyObject.SetValue(ParentContainerProperty, value); }