private static bool UseNativeLayoutMethod (Type type) { return type == typeof (FrameworkElement) || type == typeof (Canvas) || type == typeof (Grid); }