How can I define a variable in XAML?

后端 未结 5 901
灰色年华
灰色年华 2020-11-30 02:32

I have the following two buttons in XAML:

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-30 02:47

    Try this:

    add to the head of the xamlfile

    xmlns:System="clr-namespace:System;assembly=mscorlib"
    

    Then Add this to the resource section:

    2.35
    

    Lastly, use a thickness on the margin:

    
    

    A lot of system types can be defined this way: int, char, string, DateTime, etc

    Note: You're right... Had to do some better testing.. changed to code so that it should work

提交回复
热议问题