It may be necessary to dynamically modify UGUI at runtime to dynamically modify the Left, Top, Right and Bottom values of RectTransform at runtime. Unity provides two values.
scrollContent.GetComponent<RectTransform>().offsetMin = new Vector2(0.0f, 0.0f);
scrollContent.GetComponent<RectTransform>().offsetMax = new Vector2(0.0f, 0.0f);
**
offsetMin: corresponding to Left, Bottom
offsetMax: corresponding to Right, Top
**