private static void SetBindingTo(IBindingsOwner bindableOwner, Binding binding) { if (bindableOwner.Bindings == null) { throw new ArgumentNullException( $"{bindableOwner.GetType()}.{nameof(bindableOwner.Bindings)}", "List of Bindings can't be null. Please declare on the top level."); } bindableOwner.Bindings.Add(binding); }