SetMargins Method does Nothing
Nathan Sokalski
4,111
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?
Developer technologies | .NET | Xamarin
5,380 questions
Sign in to answer