【发布时间】:2010-09-26 11:01:13
【问题描述】:
我想在 WPF 中将枚举值作为命令参数传递,使用如下方式:
<Button
x:Name="uxSearchButton"
Command="{Binding Path=SearchMembersCommand}"
CommandParameter="SearchPageType.First"
Content="Search">
</Button>
SearchPageType 是一个枚举,这是为了知道从哪个按钮搜索命令被调用。
这在 WPF 中是否可行,或者如何将枚举值作为命令参数传递?
【问题讨论】:
标签: .net wpf silverlight xaml command