Forum Xamarin.Mac

Example of adding action objects at run time

DanBolDanBol USMember ✭✭

I am trying to find some examples of adding action objects (ex buttons, dropdown, text fields, etc) as run time to a view. I swear I saw an example on the Xamarin.Mac source code list but now I can't find it.


  • AhmetErcekAhmetErcek Member ✭✭

    you can add it to layout with Children.Add(component) method.

    Label label1 = new Label { Text = "ExampleLabel", BackgroundColor = Color.Gray};
    targetLayout.Children.Add(label1 );
Sign In or Register to comment.