Exemplo n.º 1
0
 IDisposable ISupportCommandBinding.BindCommand(Expression <Action> commandSelector, object source, Func <object> queryCommandParameter)
 {
     return(CommandHelper.Bind(this, (that, action) => that.Click += (s, e) => action(), (that, getState) => that.Enabled = getState(), commandSelector, source, queryCommandParameter));
 }
Exemplo n.º 2
0
 IDisposable ISupportCommandBinding.BindCommand <T>(Expression <Action <T> > commandSelector, object source, Func <T> queryCommandParameter)
 {
     return(CommandHelper.Bind(this, (that, action) => that.Click += (s, e) => action(), (that, getState) => that.Enabled = getState(), commandSelector, source, () => queryCommandParameter == null ? default(T) : queryCommandParameter()));
 }
Exemplo n.º 3
0
 IDisposable ISupportCommandBinding.BindCommand(object command, Func <object> queryCommandParameter)
 {
     return(CommandHelper.Bind(this, (that, action) => that.Click += (s, e) => action(), (that, getState) => that.Enabled = getState(), command, queryCommandParameter));
 }
Exemplo n.º 4
0
 IDisposable ISupportCommandBinding.BindCommand(Expression <Action> commandSelector, object source, System.Func <object> queryCommandParameter)
 {
     return(CommandHelper.Bind(this, (that, action) => that.ExecuteInternal = action, (that, getState) => that.Enabled = getState(), commandSelector, source, queryCommandParameter));
 }