User avatar
stonstad
Topic Author
Posts: 133
Joined: 06 Jun 2016, 18:14
Location: Lesser Magellanic Cloud
Contact:

Error Defining Thickness in Resource Dictionary?

18 Sep 2019, 19:24

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)



 
User avatar
sfernandez
Site Admin
Posts: 1911
Joined: 22 Dec 2011, 19:20

Re: Error Defining Thickness in Resource Dictionary?

18 Sep 2019, 23:18

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.

Who is online

Users browsing this forum: No registered users and 2 guests