Forum Xamarin.Forms

Getting Reference on Static Class

Hello, I have a dashboard type of page, which gets the information from a static List which is set out like this
public static class PropertiesData

public static List GetPropertiesSquare ()

      return new List<PropertiesSquare> () {
          new PropertiesSquare () {
              BackgroundColor = Color.Red,
                                //BackgroundColor = mMain.Options.BackgroundColor (What I need to work)

The problem is I need the BackgroundColor to inherit from a page set elsewhere however I can't pull that page, the usual "public Main mMain;"
returns an error because its a static class. I don't know much about Singletons to implement that. What path should I take to overcome this issue, without having to scrap static.

Best Answer


Sign In or Register to comment.