- JayOfAllTrades
- Posts: 7
- Joined:
Binding to TimeSpan
I'll be brief because I know you guys are flooded with help requests.
Inside my view model I expose a TimeSpan for an in-game countdown timer. I created three text blocks which bind to the TimeSpan.Minutes, Seconds, and Milliseconds. In Wpf it works, but in Unity I get this error.
[NOESIS/W] Can't solve PropertyPath: Type 'TimeSpan' does not contain a property named 'Minutes'
[NOESIS/E] Binding failed: Path=Time.Minutes, Source=Testing.TimerTestViewModel(''), Target=TextBlock('')
I got identical errors for the seconds and the milliseconds. The xaml for the textblock is simply:
This is the second time I've had an issue identical to this, so this time I'm reaching out so that I can find out what I'm doing wrong and avoid this mistake in the future.
Inside my view model I expose a TimeSpan for an in-game countdown timer. I created three text blocks which bind to the TimeSpan.Minutes, Seconds, and Milliseconds. In Wpf it works, but in Unity I get this error.
[NOESIS/W] Can't solve PropertyPath: Type 'TimeSpan' does not contain a property named 'Minutes'
[NOESIS/E] Binding failed: Path=Time.Minutes, Source=Testing.TimerTestViewModel(''), Target=TextBlock('')
I got identical errors for the seconds and the milliseconds. The xaml for the textblock is simply:
Code: Select all
<TextBlock Text="{Binding Time.Minutes}"/>
-
sfernandez
Site Admin
- Posts: 3008
- Joined:
Re: Binding to TimeSpan
Hi, we are not exposing those members in our native TimeSpan, could you please report it in our bugtracker? We will add it for the next release.
- JayOfAllTrades
- Posts: 7
- Joined:
Re: Binding to TimeSpan
Done! :) #2657
Also, is there any way I can verify implementation details like that in the future should I run into this problem again? The docs looked like they showed TimeSpan as having these properties when I had checked. Is that just a small mistake on the docs, or did I misreading it?
Also, is there any way I can verify implementation details like that in the future should I run into this problem again? The docs looked like they showed TimeSpan as having these properties when I had checked. Is that just a small mistake on the docs, or did I misreading it?
-
sfernandez
Site Admin
- Posts: 3008
- Joined:
Re: Binding to TimeSpan
Thanks for the report!
The docs should be the correct source of reference, this was just a bug in our code.Also, is there any way I can verify implementation details like that in the future should I run into this problem again? The docs looked like they showed TimeSpan as having these properties when I had checked. Is that just a small mistake on the docs, or did I misreading it?
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests