WPF cannot get the length from a String, because it's actually Boxed<String>
Posted: 31 May 2023, 10:45
Error Message
[Noesis - Binding]: Can't solve PropertyPath: Type 'Boxed<String>' does not contain a property named 'Length'
[Noesis - Binding]: Binding failed: Path=CustomText.Length, Source=Game.TechnologyWrapper(''), Target=Button('Slot'), TargetProperty=Game.Custom.Int
Code
game:Custom.Int="{Binding CustomText.Length}"
Explanation
The situation is that as part of a Style (for a button) I'm trying to get the length of the CustomText Noesis::String. The binding for CustomText is working, as it's content is successfully displayed within the Style, and I'm attempting to make a convenient way to collapse the textbox if the content of CustomText is "". My approaches all seemed like they should work, but weren't and after drilling down and simplifying it, I realized that the point at which I'm binding the string is revealing the shown error, that the String is actually secretly a Boxed<String>.
Have I set something up wrong somewhere, or am I missing something?
Thanks!
[Noesis - Binding]: Can't solve PropertyPath: Type 'Boxed<String>' does not contain a property named 'Length'
[Noesis - Binding]: Binding failed: Path=CustomText.Length, Source=Game.TechnologyWrapper(''), Target=Button('Slot'), TargetProperty=Game.Custom.Int
Code
game:Custom.Int="{Binding CustomText.Length}"
Explanation
The situation is that as part of a Style (for a button) I'm trying to get the length of the CustomText Noesis::String. The binding for CustomText is working, as it's content is successfully displayed within the Style, and I'm attempting to make a convenient way to collapse the textbox if the content of CustomText is "". My approaches all seemed like they should work, but weren't and after drilling down and simplifying it, I realized that the point at which I'm binding the string is revealing the shown error, that the String is actually secretly a Boxed<String>.
Have I set something up wrong somewhere, or am I missing something?
Thanks!