XF-Material-Library
XF-Material-Library copied to clipboard
[Bug] System.InvalidOperationException: 'Invalid on Color.Default'
🐛 Bug Report
I'm using a MaterialButton. The app is crazing in the init with the following code:
...
_materialButton.TextColor.MultiplyAlpha(0.38).ToAndroid()
...
Link file here. More info here.
Reproduction steps
I just add a material button and the app cant compile.
Configuration
Version: 1.7.8
Platform:
- [ ] :iphone: iOS
- [x] :robot: Android
- [ ] :checkered_flag: WPF
- [ ] :earth_americas: UWP
- [ ] :apple: MacOS
- [ ] :tv: tvOS
- [x] :monkey: Xamarin.Forms
Any news about this?
cc @martijn00
Also having this issue https://github.com/Baseflow/XF-Material-Library/issues/206
I'm missing default resources and I don't know why.
The line with the issue is this one https://github.com/Baseflow/XF-Material-Library/blob/e1779f84e95cffe1a6a00bdd129cc2c8b25c63c5/XF.Material/UI/Dialogs/MaterialConfirmationDialog.xaml#L19
I'm using this configuration in a modular app with prism.
XF.Material.Forms.Material.Init(this);
InitializeComponent();
XF.Material.Forms.Material.Use("Material.Configuration");
I have the configuration in a separate project.
I was having a problem with Material.Dialog.Width
. It seems default resources arent being merged. I add it manually and after that, I have the same error.
**System.InvalidOperationException:** 'Invalid on Color.Default'
Can you help me with that? cc @martijn00
@kerberosargos can you help me with this?
@kerberosargos can you help me with this?
I am sorry I have seen your post late. Can you try this package? XF.Material.1.7.7.1.zip
Sure
@kerberosargos can you help me with this?
I am sorry I have seen your post late. Can you try this package? XF.Material.1.7.7.1.zip
It didn't work for me @kerberosargos . Also I don't know if I did correctly. That package is for the .netstandard project?
My workaround was:
XF.Material.Forms.Material.Init(this);
InitializeComponent();
XF.Material.Forms.Material.Init(this); // WORKAROUND: Solving some reference issues
Without that line, controls break the app. The controls are showing but we cant interact with them because are breaking the app.
As I said I have a separated project with all the resources the app use including styles, colors, etc.
You should remove installed plugin after that you should install this one. Set your nuget settings as local for installing.
Luis Matos @.***>, 1 Haz 2021 Sal, 21:53 tarihinde şunu yazdı:
It didn't work for me @kerberosargos https://github.com/kerberosargos . Also I don't know if I did correctly. That package is for the .netstandard project?
My workaround was:
XF.Material.Forms.Material.Init(this); InitializeComponent(); XF.Material.Forms.Material.Init(this); // WORKAROUND: Solving some reference issues
Without that line, controls break the app. The controls are showing but we cant interact with them because are breaking the app.
As I said I have a separated project with all the resources the app use including styles, colors, etc.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Baseflow/XF-Material-Library/issues/425#issuecomment-852365815, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWWPUABYG6E5HACRYWYC23TQUUELANCNFSM43CVP2XQ .
Ok, lets me try.
Didn't work @kerberosargos
Control: MaterialTextField with Choices Behavior: When I tap the control the app break
You told that you have a configuration in separate project, but have you added that ResourceDictonary in you main App's ResourceDictonary to MergedDictonaries section ?