var label = new MaterialSkin.Controls.MaterialLabel(); label.Text = "Hello, world!"; label.AutoSize = true; label.BackColor = MaterialSkinManager.Instance.ColorScheme.PrimaryColor; label.ForeColor = Color.White; label.TextAlign = ContentAlignment.MiddleCenter; label.Style = MaterialSkinManager.Instance.GetContentStyle();
var button = new MaterialSkin.Controls.MaterialButton(); button.Text = "Submit"; button.AutoSize = true; button.BackColor = MaterialSkinManager.Instance.ColorScheme.AccentColor; button.ForeColor = Color.White; button.Style = MaterialSkinManager.Instance.GetContentStyle();In both examples, we are using the MaterialSkin library for C# to access the PaletteContentStyle property and set it to a specific value (Primary or Accent).