Questions tagged [commandparameter]
127 questions
2
votes
1 answer
Difference between "?" and "@NAME" when specifying Parameter placeholders?
If any, what is the difference between the following ways passing parameters.
SQLStr = "SELECT * FROM TABLE_NAME WHERE ID = ? "
command = new oleDbCommand(SQLStr, conn)
Command.Parameters.AddWithValue("@ID", Request.Querystring("ID"))
Vs.
SQLStr =…

Guranjan Singh
- 734
- 2
- 7
- 24
2
votes
1 answer
MVVCross: Pass an enum value as a CommandParameter for Android
I want to pass an enum value as a CommandParameter.
My enum is defined as:
public enum MyEnum
{
One,
Two
}
And in my axml I have:
local:MvxBind="Click MyCommand, CommandParameter=MyEnum.One"
...
local:MvxBind="Click MyCommand,…

Pap
- 149
- 1
- 4
- 12
2
votes
0 answers
WPF: can't pass System.Int32 as CommandParameter
I have a Button with an attached Command:
where the command is:
public ICommand command
{
get {…

undermind
- 1,779
- 13
- 33
2
votes
1 answer
CommandParameter usage in KeyInput Bindings Vs. Button bindings
The following two elements are firing in my implementation of ICommand differently and causing problems. When the implementation enters CanExecuteChanged(object parameter) for the TextBox, the value of parameter is null. When it enters the same…

Kevin
- 429
- 3
- 10
2
votes
1 answer
Command parameter in EventTrigger
I'm working on WinRT with MvmmCross v3 framework and Windows.UI.Interactivity.
I want a TextBox with an EventTrigger on the event TextChanged which launch a Command. And also, I want in CommandParameter the text of the textBox.
So I have this code
…

Podelo
- 386
- 4
- 8
- 23
2
votes
2 answers
How to get current element in WPF datagrid and how to do something with it?
Some time ago I began to study the MVVM pattern with this tutorial. I use MicroMvvm.
I have a WPF project with EntityFramework model. I wrote ViewModels and XAML views.
I want to display my data in a DataGrid.(2 columns with data and 2 buttoncolumn:…

chromigo
- 1,134
- 1
- 15
- 25
2
votes
2 answers
Different Datacontext for Command and CommandParameter
Is it possible to have a different Datacontext for a WPF Command and a CommandParameter?

Johannes Wanzek
- 2,825
- 2
- 29
- 47
1
vote
2 answers
RelayCommand commandParameter is null
I have a button on my usercontrol
SaveCommand is a RelayCommand declared in…

kzub
- 232
- 3
- 13
1
vote
1 answer
WPF DataBinding (CommandParameter not working)
I can't get my binding to work. My ActiveView has a ListView (x:Name="MyListView") as well as a view model as it's data context.
I have the following RibbonButton (RibbonControlLibrary):

Thomas Huber
- 1,282
- 1
- 13
- 23
1
vote
1 answer
wpf SelectedIndex CommandParameter
A button's Command is ExcelExportCommand and its CommandParameter is like:
1
vote
2 answers
Binding XAML usercontrol in XAML
I have two UserControls: Main nad Settings.
In Main in some control I want to set CommandParameter in XAML to Settings. In C# code is simple, like:
biSettings.CommandParameter = new Settings();
How can I do that in XAML?
CommandParameter="???"
The…

Musketyr
- 745
- 1
- 16
- 37
1
vote
1 answer
In Xamarin Forms application in MVVM, i use FreshMvvm framework and want to navigate to targetPageModel and pass data from commandParameter
xaml extract :
In This code command callback with parameter works well :
NextPageButtonCommand = new Command(parameter =>…

Julien Duprat
- 55
- 4
1
vote
0 answers
Is it ok to have the client and the invoker modifying the concrete ICommand, in the command pattern design?
I am trying out this flavor of the command pattern, for practice purposes, where the concrete implementation of the ICommand needs two pieces of data in order to properly execute. As of right now, the Client provides the initial data point via the…

Fabio S.
- 460
- 7
- 22
1
vote
2 answers
Deleting row in listview using Command + CommandParameter in WPF + MVVM
I want to delete a row in ListView Control using Command and CommandParameter like below.
…

Pak
- 125
- 3
- 13
1
vote
1 answer
Execute command with parameter using xaml binding and viewmodel
Currently I have in xaml:

Theun Arbeider
- 5,259
- 11
- 45
- 68