Page 1 of 1

Error Defining Thickness in Resource Dictionary?

Posted: 18 Sep 2019, 19:24
by stonstad
Should I be able to define a thickness in a resource dictionary (https://stackoverflow.com/questions/198 ... -resources)?

Here are the errors that I get from Noesis. Maybe I'm doing it wrong?
<Thickness x:Key="ScreenMargin">20, 75, 20, 0</Thickness>
OR
<Thickness x:Key="ScreenMargin" Left="20" Top="75" Right="20" Bottom="0"/>
RESULTS
[noesis] Assets/User Interface/ResourcesCommon.xaml(8): Can't assign property to abstract class 'Thickness'.
UnityEngine.Debug:LogError(Object)
NoesisUnity:UnityLog(Int32, String) (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:116)
Noesis.GUI:Noesis_LoadXaml(String)
Noesis.GUI:LoadXaml(String) (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:192)
NoesisXaml:Load() (at Assets/NoesisGUI/Plugins/NoesisXaml.cs:30)
NoesisUnity:LoadApplicationResources() (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:44)
NoesisUnity:Init() (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:24)
NoesisXaml:RegisterDependencies() (at Assets/NoesisGUI/Plugins/NoesisXaml.cs:48)
NoesisXaml:OnEnable() (at Assets/NoesisGUI/Plugins/NoesisXaml.cs:9)




Re: Error Defining Thickness in Resource Dictionary?

Posted: 18 Sep 2019, 23:18
by sfernandez
This should work, I just verified it in our XamlPlayer and Unity:
<Thickness x:Key="ScreenMargin">20, 75, 20, 0</Thickness>
The other construct (specifying struct values as attributes) is not supported in Noesis.