Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我定义了以下类:
public static class A { public static readonly double MyWidth = 200d; }
如果我想将“MyWidth”作为命令参数发送到按钮,我该如何设置 xaml?
<Button Caption="Large" CommandParameter="What should I type here?">
谢谢!
CommandParameter="{x:Static ns:A.MyWidth}"
wherens已映射到适当的 CLR 命名空间。
ns