-
Notifications
You must be signed in to change notification settings - Fork 69
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
Textbox border not updating after theme change until clicked #321
Comments
This is issue on Avalonia side. Also, duplicate of #262 |
Thanks, I missed the original issue, are you aware of any workaround? I will follow up with the issue on the avalonia side that you have opened. |
I was thinking about removing and re-adding the necessary brushes that are used in the TextBox when the theme changes. I assume that this should be done in the MaterialTheme/MaterialThemeBase class. I did a similar workaround for a similar bug some time ago. If you experiment, please let me know the results. I'm also planning to do some tests on this, but I'm not sure when I'll have free time to do it. |
Happy to look further into this, but I need to make sure I understand you correctly as this is all new to me. Are you saying when setting the theme in MaterialThemeBase, I should also look at which brushes inside the materialThemebase and re-assign them? |
Yep. You can also look to commit history of these files and you should find the required code. |
I have a textbox:
I have a button to flip the theme of my app via:
I have noticed when flipping the theme, the borderbrush of my textbox doesnt get changed until I "click" into the textbox and it somehow refreshes? Is there someway to force it to change? See gif below:
![Animation](https://private-user-images.githubusercontent.com/49313258/284298870-dc12e2f0-73f3-4282-b80e-12ede6038be1.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwNjEyMDEsIm5iZiI6MTcyNjA2MDkwMSwicGF0aCI6Ii80OTMxMzI1OC8yODQyOTg4NzAtZGMxMmUyZjAtNzNmMy00MjgyLWI4MGUtMTJlZGU2MDM4YmUxLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTExVDEzMjE0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk2ZDdlN2I1ZTA0OWE2YjEzY2I2OWZjNThiMjc5OThmNGZhNDk2NTk0YzlkYjRlMTJmNWNkOGYyYTM4Nzc0MTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.7eA1y4aJXZK5ueJTe0vzBJfEVAhQoB0SPkAIEPr_b54)
The text was updated successfully, but these errors were encountered: