Silverlight command

1,279 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,279
On SlideShare
0
From Embeds
0
Number of Embeds
390
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Silverlight command

  1. 1. Enabling Commands in Silverlight<br />Mahender<br />Senior Software Engineer<br />United Health Group<br />
  2. 2. Mahender Sarangam<br />Having 5 years of experience on .NET Technologies. Working as a Senior Software Engineer in United Health Group (UHG India Information Service Ltd.). Worked with Big Firms like Deloitte Consulting & Wipro Technology. <br />Got Technical Acquaintance on Technologies like C#, ASP.NET,AJAX, LINQ, Silverlight, WPF,WCF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology. <br />MCTS Certified in Web Technologies.<br />Blog : http://Msarangam.wordpress.com <br />
  3. 3. Commands<br />One of the great advantages to commanding is encapsulation<br />Silverlight 4 now came up with the support of Command Binding. Using Command binding you can easily develop your Silverlight MVVM<br />
  4. 4. Commands are supported by only two element classes: Hyperlink and ButtonBase (although several button-like controls derive from ButtonBase).<br />Commands work through two properties that have been added to the Hyperlink and ButtonBaseclass: Command and Command Parameter. <br />The Command is the action that will be triggered when the button click takes place<br />The CommandParameter is a single object that will be passed to the command, with additional information.<br />Need to implement ICommand Interface<br />
  5. 5. ICommand Interface<br />ICommand interface features the following three members:<br />Execute(object parameter) - Called whenever the command is activated. The parameter is optional.<br />CanExecute(object parameter) - This method is called to determine whether the command can execute at the current time. The main feature of this is the command source can disable itself if its command cannot be executed.<br />event CanExecuteChanged - The command should raise this event whenever it's ability to be executed has changed.<br />
  6. 6.
  7. 7. Thank you<br />

×