public static TestComponent ScrollIntoViewIfNeeded(this TestComponent component) { if (component.Container == null) { throw new InvalidOperationException("component's container is not defined"); } return(component.ScrollIntoViewIfNeeded(component.Container)); }