Check out example codes for "set margin programmatically wpf c#". It will help you in understanding the concepts better.

Code Example 1

test.Margin = new Thickness(0, -5, 0, 0);

Learn ReactJs, React Native from akashmittal.com