2
我與玩弄的RoutedCommand,和我在與發現的問題我怎麼能傳遞一個參數,使我伏法方法有它在e.Parameter?的RoutedCommand與參數
我的RoutedCommand:
public static readonly RoutedCommand Foo = new RoutedCommand();
用法:
menuItem.Command = Commands.Foo;
伏法:
private void Foo_Executed(object sender, ExecutedRoutedEventArgs e)
{
object parameter = e.Parameter; // this is always null
}
衛生署訂!忽略了這一個......無論如何感謝你的快速回答! – pguzewicz