Hi again! Im trying to change the color of Apply button when something happens, but i only seem to be able to change the color if i put it inside the button_OnClicked event. I need to change the color from another class, so i tried using an interface but that didnt work either. Help?
This works:
private async void Button_OnClicked(object sender, EventArgs e)
{
ApplyButton.BackgroundColor = Color.FromRgba(52, 152, 219, 255);
}
This does not work:
public void FlagApplyChanges()
{
ApplyButton.BackgroundColor = Color.FromRgba(52, 152, 219, 255);
}
Other class:
var manager = DependencyService.Get<ISettingsPage>();
Device.BeginInvokeOnMainThread(() => manager.FlagApplyChanges());