Questions tagged [commandparameter]

127 questions
0
votes
2 answers

Why is a string expected at this point?

From an answer or comment to my question here, I was directed here. So I changed my code from this: double _imdbThreshold = 0.0; (IMDBRating is a Decimal(2,1) data type in the SQL Server (Express)…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
0
votes
2 answers

wpf CheckBox command parameter

In my View I have 8 checkboxes all bound to a different property in the Model, lets say bool port1 ... port8. The property changes when the concerned checkbox is clicked. When the user checks or unchecks one of these checkboxes, I also execute a…
tom2051
  • 82
  • 9
0
votes
2 answers

How can I pass any DataGridTextColumn to a single Command which will toggle the Visibility of the DataGridTextColumn?

I have a DataGrid and would like to toggle Visibility of individual DataGridTextColumns with Commands sent from a ContextMenu. I need some way to associate a particular DataGridTextColumn, or its Visibility parameter with a ContextMenu MenuItem…
nickEggs
  • 11
  • 1
  • 4
0
votes
2 answers

Identify which button was clicked in WPF gird based on 2D array

I'm building an app which will display a list of buttons in 2D grid, similar to How to populate a WPF grid based on a 2-dimensional array The challenge is to tell which button (in terms of i, j) was clicked in the buttonClick event handler. My…
dash-o
  • 13,723
  • 1
  • 10
  • 37
0
votes
1 answer

Tap gesture with Command Parameters

I have a listview with an ItemTemplate defined as follows:
0
votes
1 answer

Send current Item and checkbox value in command parameters

I have a TreeView setup with a HierarchialDataTemplate. It's ItemsSource is bound to a collection of Overlay objects in my viewmodel, where each Overlay has a collection of Layer objects (thus the HierarchialDataTemplate). For each Overlay, I'm…
pfinferno
  • 1,779
  • 3
  • 34
  • 62
0
votes
2 answers

Get DataGridColumns Binding Path from DataGridColumnHeader with MultiBinding in DataGridHeader Style

Within my DataGridColumnHeaderStyle I have the following MultiBinding:
Pete
  • 469
  • 7
  • 18
0
votes
1 answer

silverlight: How to pass a value from an item in a listbox by clicking a button beside the item

I have a Listbox, shows an item and a delete button beside it. How can i trigger the relay command passing a parameter to the viewmodel so i can execute the deletion. Sample code.
mark vanzuela
  • 1,373
  • 4
  • 23
  • 37
0
votes
1 answer

How to get object from ObservableCollection within clicking it in UI?

I've got a field of TextBlocks that I'm displaying in a Uniform Grid, when I click one a Command triggers. How can I now get the specific object that was clicked from the displayed Collection? For more information check my previous question about…
C.User
  • 153
  • 18
0
votes
0 answers

Show Microcharts.Chart in custom ViewCell

I have a ListView with custom ViewCell. ViewCell contains Microcharts.Chart. I use binding and try to find a way to show particular chart in ListView item depending on some condition (because charts are absent for now). Here is a part of XAML code: …
Remin Maxim
  • 41
  • 1
  • 9
0
votes
3 answers

How does WPF solve same ElementName issues?

Say the following HierarchicalDataTemplate displays 2 Data Sets. Then there a 2 ListBoxes with the same x:Name ="MyListBoxName". How does WPF knows which one to pass as CommandParameter ????
Fabian
  • 63
  • 11
0
votes
1 answer

Binding KeyUp Event with Parameter

I'm using a RadGridView in WPF (VB.Net) and I set to it an EventBinding like this :
user7884267
0
votes
0 answers

freshmvvm command parameter

I have a Command with CommandParameter in my Page but when is trigger for PageModel value is null and I not what´s up. I have a Model "UserLogin": [AddINotifyPropertyChangedInterface] public class UserLogin { public string Username { get; set;…
Ordep
  • 11
  • 3
0
votes
0 answers

WPF CommandParameter is null despite being bound

I'm stumped on this one. Why would a command parameter be continuously empty despite being bound to a property that has a value. XAML
Jamie Marshall
  • 1,885
  • 3
  • 27
  • 50
0
votes
1 answer

c# Entering data from list into Access Database with foreach results in duplicated values in all rows

I am attempting to input a list from C# to an Access Database. However when it get input all of the rows have the exact same values. I can do a console write in the for each and show that it is getting the correct values, it's just writing the same…
1 2 3
8 9