command

Bind Command to MenuItem

Hi I have ListView and i am trying to bind command to ContextMenu of ListView. <ListView x:Name="listView1" ItemsSource="{Binding Path=Persons}"> <ListView.Resources> <ContextMenu x:Key="ItemContextMenu"> <MenuItem Header="Add" /> <MenuItem Header="Edit"/> ...

Customizing toolbar items in VS2010

Has the menu & toolbar customization functionality in VS2010 been reduced? I can't seem to be able to select an icon for an added command, nor set it to be icon-only. Previous versions of Visual Studio supported this functionality and even allowed the creation/editing of custom icons. Is this something that has suffered as a result of ...

Migrating from Forms to WPF

We're considering migrating a WinForms app to WPF, but are just starting on the WPF learning curve now that 4.0 is out. What I'd like to do is migrate our application commands (cut, copy, paste, etc) to a WPF-like command-binding system, while still running as a WinForms app - but in such a way as to make the migration easy when we go a...

MVVM Light is too fast :)

Hello, I have a simple WM7 Page with a TextBox. Futher, I assigned EventToCommand (a RelayCommand<string>) to this TextBox, reacting to the TextChanged event. For testing pourposes I made additional method TextBox_TextChanged in the page's code behind. Both the command and TextBox_TextChanged print a message box with the textbox content...

MSBuild Working with ItemGroup and EXEC Command

I created the ItemGroup shown in the code snippet. I need to iterate through this ItemGroup and run the EXEC command - also shown in the code snippet. I cannot seem to get it to work. The code returns the error shown below (note - the Message is written 2 times, which is correct), but the EXEC Command is not running correctly. The va...

command design pattern usage

Hi. I've read 3 descriptions of the command design pattern: wikipedia, dofactory and source making. In all of them, the UML shows a relation between the client to the receiver & the concrete command, but no relation to the invoker. But in all 3 examples the client is the one that initiates the invoker and call its Execute method. I thi...

WPF UserControls - setting the .Command property on button inside UserControl

I've got a UserControl that contains a button and some other controls: <UserControl> <StackPanel> <Button x:Name="button" /> ... </StackPanel> </UserControl> When I create a new instance of that control, I want to get at the Button's Command property: <my:GreatUserControl TheButton.Command="{Binding SomeCommandHere}"> <...

Makefile : assigning function variable in target command line

I need the xpi_hash variable to be assigned only when update target's command is decided to execute. Then I'm using this variable as environment, exporting, etc.. If I put it outside of rule, it will be expanded firstly, before $(xpi) target is called, hence will not find that file. substitute := perl -p -e 's/@([^@]+)@/$$ENV{$$1} bla ...

Routed Command Question

I'd like to implement a custom command to capture a Backspace key gesture inside of a textbox, but I don't know how. I wrote a test program in order to understand what's going on, but the behaviour of the program is rather confusing. Basically, I just need to be able to handle the Backspace key gesture via wpf commands while keyboard f...

Trouble binding command to button in WPF

I've got a button in a ribbon I've implemented and having trouble binding to a command. The ribbon is in a UserControl named AppRibbon. The AppRibon control has a public property called SelectedModule which has a property named RenameModuleCmd. When I create an event handler for the button, i call the command explicitly to make sure ever...

Command Binding And The Backspace Key

I need to bind a command to the Backspace key. The command needs to be enabled when keyboard focus is in a textbox, which in turn is inside of the DataTemplate for an ItemsControl. The following code doesn't seem to acknowledge that the backspace key is being depressed, and the CanExecute handler for the CommandBinding isn't getting ca...

Execute a SQlite command with Entity Framework

Hi everybody, I use a SQLite database and Entity Framework (with .net framework 3.5). I'm trying to execute a simple SQL non query command to create a new table in this datase. My Entity Framework already contains the object model for this table : I just want to generate the corresponding table using a command. (By the way, there is ma...

Is it possible to find all commits made by a user under a project in cvs

Hi everyone is there any command or utility to find all the commits made by a user in a project in cvs ? ...

Multiple key binding in WPF

How can i execute some command on, lets say, Ctrl+Shift+E? As i saw we can write the following: KeyBinding kb = new KeyBinding(TestCommand, Key.E, ModifierKeys.Control); this.InputBindings.Add(kb); But how can i add more ModifierKeys or Keys? ...

a selective dual command binding converter in WPF?

I'll start off and say I am not using the MVVM pattern for my WPF app. Please forgive me. Right now I have a data template with two buttons, each binds to a different command on the CLR object this data template represents. Both use the same command parameter. Here's an example of the buttons. <Button x:Name="Button1" Command="...

Cocoa: Using UNIX based commands to write a file

I'm looking for help with a program im making. I create a *.sh file as follows: SVN_StatGenAppDelegate.h: NSWindow *window; NSTask *touch; NSArray *touchArguments; NSString *svnURLStr; NSString *SVNStatStr; NSString *destDirStr; SVN_StatGenApplDelegate.m: NSString *locationStr = [NSString stringWithFormat:@"%...

Send ESC commands to a printer in C#

My application needs to print invoices, then a get the invoice from database, insert informations os the invoice in a big string (tellling the line, column, etc). after this a have the string ready to be sent to a printer. My problem is: I need to put some ESC/P commands/characters in my big string i try to do something like this: ...

Execute multiple command lines with the same process using C#

Hi according to my last question here I try to write a sql Editor or some thing like this,in this way I try to connect to CMD from C# and execute my command. now my problem is for example I connect to SQLPLUS after that I cant get SQLPLUS command,and the other resource I review don't satisfy me.Please help me how after I connected to Sql...

MySQL select two tables at the same time...

Hi all I have two tables and want to make a query. I tried to get team AA and team BB's image base on table A. I used: SELECT tableA.team1, tableA.team2, tableB.team, tableB.image, FROM tableA LEFT JOIN tableB ON tableA.team1=tableB.team The result only display imageA on the column. Are there any ways to select imageA and i...

TextBox and Button - Binding and Command problem

I am using MVVM pattern. I have a Text box whose Text property is bound to ViewModel's(VM supports INotifyProperyChange) Text property Button whose command is bound to VM's ICommand property type You may think of this as a SearchTextBox and SearchButton The problem I am facing is that when I enter the text in SearchTextBox and cli...