public static bool CanContentControlAdd(ContentControl control) { Debug.Assert(control != null); return !_contentControlsNotAllowedToAdd.Any(type => type.IsAssignableFrom(control.GetType())); }
/// <summary> /// Asserts the equality of two Sizes for a particular LayoutTransformer scenario. /// </summary> /// <param name="expected">Expected value.</param> /// <param name="actual">Actual value.</param> /// <param name="control">Control being tested.</param> /// <param name="detail">Detail message.</param> private static void AssertAreEqual(Size expected, Size actual, ContentControl control, string detail) { Assert.AreEqual(RoundedSize(expected), RoundedSize(actual), string.Format(CultureInfo.CurrentCulture, "{0}/{1}: Expected ({2}), actual ({3})", control.GetType().Name, detail, expected, actual)); }