SetMargins Method does Nothing
Nathan Sokalski
4,106
Reputation points
I am attempting to programmatically set the margins of several View(s) using the SetMargins method using code similar to the following:
(this.btnNewPicture.LayoutParameters as LinearLayout.LayoutParams).SetMargins((int)(137.5 + 72), 0, 0, 0);
This does not seem to do anything. If I set the margins in xml it works fine. What is the problem?