Cannot set ValueFormat in Xaml

4 posts, 0 answers
  1. Miroslav
    Miroslav avatar
    30 posts
    Member since:
    Feb 2012

    Posted 24 Mar Link to this post

    Hello,

    I want to set ValueFormat as integer. I tried this ValueFormat="{}{0,0:N0}", resp. I change format in designer and get this in Xaml. But when I build, I get error "Cannot assign to nullable type on property Value". How can I set ValueFormat in Xaml without error?

    Best Regards

    Miroslav Mareš

  2. Miroslav
    Miroslav avatar
    30 posts
    Member since:
    Feb 2012

    Posted 25 Mar in reply to Miroslav Link to this post

    Hello,

    I'm sorry, I take back what I wrote before... this error make this declaration Value="100" and not ValueFormat definition. ValueFormat works right. But I still not understand, why this error occurred...

    Best Regards

    Miroslav Mareš

  3. DevCraft banner
  4. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 28 Mar Link to this post

    Hi Miroslav,

    This is because the Xaml stack in WinRT cannot resolve nullable types and the Value property is of double? type.

    I hope this helps.

    Regards,
    Ivaylo Gergov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Miroslav
    Miroslav avatar
    30 posts
    Member since:
    Feb 2012

    Posted 02 Apr in reply to Ivaylo Gergov Link to this post

    OK, thank you.

    Best Regards

    Miroslav Mareš

Back to Top
DevCraft banner