commandbinding Questions
2
Solved
I am trying to get a method to run when a view has finished loading. I have tried to bind a command to the Loaded event in the view but it fails to run. The inner exception that is thrown is
'P...
Whispering asked 29/7, 2013 at 20:0
9
Solved
(Note - this is a re-post as my first question got posted under wrong headline: Here Sorry!)
I have a standard WPF treeview and have bound items to view model classes.
I now wish to handle behavi...
Anhinga asked 21/12, 2010 at 9:30
6
Solved
I have just started learning MVVM. I've made the application from scratch by following this MVVM tutorial (I highly recommend it to all MVVM beginners out there). Basically, what I have created so ...
Portable asked 4/4, 2011 at 22:47
5
Solved
I have a search field in my WPF app with a search button that contains a command binding. This works great, but how can i use the same command binding for the text field when pressing enter on the ...
Torray asked 19/10, 2009 at 8:42
4
Solved
Is it possible to fire a command to notify the window is loaded.
Also, I'm not using any MVVM frameworks (Frameworks in the sense, Caliburn, Onxy, MVVM Toolkit etc.,)
Bombast asked 4/8, 2010 at 17:25
6
Solved
I have a Menu where each MenuItem in the hierarchy has its Command property set to a RoutedCommand I've defined. The associated CommandBinding provides a callback for the evaluation of CanExecute w...
Dairyman asked 27/8, 2009 at 10:54
7
Solved
The easiest way is to implement ButtonClick event handler and invoke Window.Close() method, but how doing this through a Command binding?
Vermont asked 30/6, 2009 at 20:32
2
Solved
I need to implement a custom copy + cut + paste for data (not text or CSV) to be copied between grids in a WPF application. Using standard ApplicationCommands and defining CommandBinding works real...
Izzard asked 14/4, 2015 at 14:55
2
In WPF application I am currently trying to bind a Command to launch a calculator Tool form any where in the application using shortcut keys, I have created a command but not getting how to map com...
Oleg asked 23/8, 2009 at 20:7
6
Solved
Sometimes we used complex ways so many times, we forgot the simplest ways to do the task.
I know how to do command binding, but i always use same approach.
Create a class that implements IComman...
Garden asked 12/12, 2012 at 11:36
2
Solved
I have a ListBox the ItemTemplate bound to an ObservableCollection of my items.
At the moment, I'm trying to implement Cut/Copy/Paste/SelectAll (To keep it short, I'll just show selectall here...)
...
Brandon asked 16/2, 2015 at 14:16
3
Solved
I am developing a WPF application, and have a TextBlock which I want to use command binding to trigger a command on when clicked. What's the best way to achieve this?
The TextBlock-control does ...
Achernar asked 24/11, 2009 at 13:12
1
Solved
How can I use <Interaction.Behaviors> and <EventTriggerBehavior> in a Windows 10 universal app? I will get something like this with Blend:
Source both images above: Jef Daels 2015
...
Sputter asked 26/12, 2015 at 12:19
4
Solved
I know how to use the MouseDoubleClick event with my DataGrid to grab the selectedvalue, but how would one go about using command bindings instead? That way my ViewModel can handle the logic.
So f...
Jaclyn asked 6/10, 2010 at 20:38
1
Solved
How can I access the datacontext of the parent element in windows phone 8?
AncestorType is not available in WP8.
<ItemsControl x:Name="Elements" ItemsSource="{Binding MyList}" Grid.Row="2" Gri...
Dedrick asked 16/4, 2013 at 12:29
4
Solved
I have a button on a view that is bound via a RoutedUICommand to a command defined in the ViewModel.
The XAML code excerpt from the view:
<Button Content="Login" Command="{Binding Login}" /&g...
Floro asked 22/9, 2010 at 13:9
1
Solved
I have a textblock with command binding and using Prism library.
this is the XAML parth:
<TextBlock Margin="0,10,0,0">SocialSecurityNumer:</TextBlock>
<TextBox Name="SSNText" GotFo...
Quan asked 2/9, 2011 at 14:30
1
Solved
Previously I had been using
this.CommandBindings.Add(
new CommandBinding(ApplicationCommands.Copy, this.cmdCopy_Executed, this.cmdCopy_CanExecute))
where cmdCopy_Executed is a non-static functi...
Benthamism asked 17/6, 2011 at 16:19
1
Solved
The WPF Treeview responds to + and - keystrokes to expand and collapse nodes in the tree. Great!
Is there an existing command I can bind my toolbar buttons or menu items to to perform the same act...
Vernacularize asked 19/1, 2011 at 4:25
1
Solved
Im deriving from a third party control. It is implementing ApplicationCommands.SelectAll. However the behaviour i want is slightly different. there is no virtual method i can override, and when i r...
Canso asked 15/3, 2010 at 4:36
1
Solved
I have a ToggleButton. I'm using a command binding, and I want to pass the value of its IsChecked property as a parameter. How can I do this without naming the ToggleButton and using its name to ad...
Immedicable asked 23/2, 2010 at 9:25
2
I have a UserControl that adds a CommandBinding to it's CommandBindings collection to handle a specific Command. Later I use this control in a window and want to add another binding to that same co...
Fingering asked 18/2, 2010 at 16:18
1
Solved
In my WPF application I have a TextBox and a Button. The button has a command binding to a command that will do something with the text.
<TextBox x:Name="_textBox"></TextBox>
<Butt...
Infective asked 8/2, 2010 at 10:20
1
When i create a user control that has a CommandBinding to a RoutedUICommand im worried that i get memory leaks.
scenario:
Have a RoutedUICommand as a static in c class where i store my commands
I...
Qualm asked 8/1, 2010 at 5:40
1
I am binding my command like:
<Button Command="{Binding NextCommand}"
CommandParameter="Hello"
Content="Next" />
Here, I also bind its CommandParameter property, now how to fetch its ...
Malvoisie asked 14/10, 2009 at 8:51
1 Next >
© 2022 - 2024 — McMap. All rights reserved.