Questions tagged [delegatecommand]

WPF design pattern that provides a generic reusable implementation of ICommand. Versions of this object can be found in the versions of Microsoft Prism.

100 questions
0
votes
1 answer

e.Tag DelegateCommand Binding

i have a little problem and find no way how to fix it. I create a Button with a Commandbinding. This Button calls a DelegateCommand, but i need the "e.Tag" of this button and DelegateCommand just return "null". So do any of you know a way to solve…
JakeFrost77
  • 41
  • 2
  • 3
0
votes
1 answer

Scope for Actionscript 2.0 Event

I'm using Actionscript 2.0 for a mobile phone and can't get my head around Events. I'm creating a class object with all my code and using a group of functions (all as direct 1st level children of the class). There's one function that creates a…
Ferric
  • 5
  • 1
0
votes
1 answer

C# to VB.NET Delegate command translation

Could one of you gurus help with a bit of translation? Argument not specified for 'userList' of 'Private Sub OpenUserDetail(userList as Model.UserList)'. It works in the C# version just not sure about the C# to VB translation. Any help would be…
Aaron Bar
  • 611
  • 1
  • 7
  • 20
0
votes
0 answers

Issues with WPF CommandParameter received by DelegateCommand

In WPF, I have this Button (with a ContextMenu) that has a MyString string property defined in the code behind. I'm trying to send this string as the CommandParameter of a DelegateCommand called when one of the MenuItem of the ContextMenu is…
roccaforte
  • 81
  • 5
0
votes
0 answers

Increment or Decrement textbox value by 0.1 by clicking plus or minus button

I'm getting error for adding TotalCurrent(decimal) adding 0.1 but getting error I have two methods called IncreaseAmplitude and DecreaseAmplitude of return type float in viewmodel where I'm trying to increment or decrement the TotalCurrent(bind to…
0
votes
1 answer

WPF : MVVM Microsoft.Expression.Interaction

I am working on MVVM , I have used interactions. Purpose is what ever will be typed in text box, same will be displayed in TextBlock. Interaction trigger will be done event PreviewTextInput of text box. But it is giving error but not working as…
0
votes
2 answers

DelegateCommand RefreshCommand to refresh ObservableCollection-bound DataGrid

I'm trying to update my DataGrid (name: dgLicenseholder, bound to an ObservableCollection. I am using MVVMLight) when I add new rows to the database. Why isn't this working? In my ViewModel, I have a public DelegateCommand RefreshCommand {get;…
Ole M
  • 317
  • 1
  • 17
0
votes
2 answers

Pass three parameters to Prism DelegateCommand to use the same command on different button commands [MVVM mode]

I have the following DelegateCommand, created with the Prism library. public class AddressModel : INotifyPropertyChanged { public ICommand MyButtonClickCommand { get { return new DelegateCommand(FuncToCall); } } …
DelusionX
  • 79
  • 8
0
votes
1 answer

Using of RaiseCanExecuteChanged

I make two methodes like this: private void Next(string argument) { Current = Clients[Clients.IndexOf(Current) + 1]; ((DelegateCommand)NextCommand).RaiseCanExecuteChanged(); } private void Previous(string argument) { Current =…
Tity
  • 5
  • 3
0
votes
0 answers

Delegate Command with Async Function in Xamarin forms

In Xamarin forms we have delegate commands like this: /// Gets or sets the logout command. /// /// /// The logout command. /// public DelegateCommand LogoutCommand { get;…
0
votes
2 answers

WPF ICommand equivalent of Click -= Button_Click

For WPF ICommand, what is the equivalent of the event handler -=? We have a user control button that manages the function of submitting a purchase request but requires a user to register on the workstation first. The WinForms usage is: this.Click -=…
Galactic
  • 400
  • 4
  • 14
0
votes
2 answers

How to check if a control is resigning first responder or become first responder?

I have a view that a content some NSTextfields and NSComboboxes. I want to do something when one of these controls resign first responder. I already try the delegate method - (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText…
0
votes
1 answer

How to fill ListBox from a List with DelegateCommand in WPF?

I faced a problem while trying to fill my ListBox. I have a button in my xaml file:
pirogtm
  • 35
  • 3
0
votes
1 answer

How to use a parameter in a Task-Based DelegateCommand in Prism

Can I use a parameter in a task-based DelegateCommand (Prism.Commands): (https://prismlibrary.com/docs/commanding.html) public class ArticleViewModel { public DelegateCommand SubmitCommand { get; private set; } public ArticleViewModel() …
0
votes
1 answer

WPF DelegateCommand how to control when CanExecute method is called

I have a checkbox on a grid column that has a command assigned to it. My CanExecute method is firing when I load the window and for each item in the grid even if I haven't clicked the check box. I end up with a loop of messagebox dialogs to close.…
MickB
  • 265
  • 1
  • 4
  • 11