You can declare the TextColor as bindable property add then set the style:
public class MyClass : Grid, IDisposable { private Label label; public static readonly BindableProperty TextColorProperty =BindableProperty.Create("TextColor", typeof(Color), typeof(MyClass), Colors.Black); public Color TextColor { get => (Color)GetValue(TextColorProperty); set { SetValue(TextColorProperty, value); label.TextColor = value; } } }
For more information, you can read the official document about Bindable properties