Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in changing backgroudcolor in the code #65

Closed
henryyue2010 opened this issue Sep 19, 2018 · 3 comments
Closed

bug in changing backgroudcolor in the code #65

henryyue2010 opened this issue Sep 19, 2018 · 3 comments

Comments

@henryyue2010
Copy link

henryyue2010 commented Sep 19, 2018

Describe the bug
It seems there is a bug in changing the flex button backgroundcolor from codes. I have two flex buttons in the content page. I want to change the buttons' backgroundcolor when clicking the buttons.
I use the following codes:
private void button1_OnClicked(object sender, EventArgs e)
{
button1.BackgroundColor = Color.Blue;
button2.BackgroundColor = Color.White;
}

private void button2_OnClicked(object sender, EventArgs e)
{
button1.BackgroundColor = Color.White;
button2.BackgroundColor = Color.Blue;
}

but after buttons change to blue, they are not able to change to white

Expected behavior
click button1: button1 is blue, button2 is white.
click button2: button1 is white, button2 is blue.

I am using FlexButton 0.8.0, Xamarin.Forms 3.1, PCL

anyone met same problem?

@AlecDTucker
Copy link

There is something funky happening with the BackgroundColor property. Setting it in line in xaml works fine, but trying to set it in a style doesn't work. Interestingly, intellisense shows two properties called BackgroundColor. Assigning it in line shows them one way round, and works fine. Assigning it in a style shows them the other way round, and has no effect.

This is with FlexButton 0.8, Xamarin.Forms shared project, intellisense provided by MFractor.

robinmanuelthiel added a commit that referenced this issue Oct 24, 2018
@robinmanuelthiel
Copy link
Owner

@mmacneil
Copy link

In 0.9.0 the issue @AlecDTucker mentions about being unable to set the BackgroundColor property from a Style appears to exist still. I will open a new issue with a sample. @AlecDTucker did you ever update to 0.9.0 and confirm this was fixed?

Thanks,
Mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants