PC Review


Reply
Thread Tools Rate Thread

Command in RibbonControlLibrary

 
 
Daniel
Guest
Posts: n/a
 
      2nd Jan 2009
The default Command system in WPF allow me to achieve common task like
copy/paste simply by
Command="Copy"
But the WPF Ribbon control has its own command type called RibbonCommand,
which won't allow me to do such.
So it becomes a little bit complicated for me to just put a "Copy" button on
the ribbon because it looks like I have to implement the logic myself.
There're quite a lot of editable controls on my UI, what can I do to have
these basic tasks on the Ribbon?

Thank!


Daniel
 
Reply With Quote
 
 
 
 
Zhi-Xin Ye [MSFT]
Guest
Posts: n/a
 
      5th Jan 2009
Hi Daniel,

Thank you for using Microsoft Managed Newsgroup Service, my name is Zhi-Xin
Ye, it's my pleasure to work with you on this issue.

As far as I know, in the preview version of WPF Ribbon, there's no built-in
way to use an existing ICommand instance in RibbonCommand, however, our
developers are considering this feature when designing the V1 of WPF
Ribbon, you should be able to do this in V1. For the time being, you can
add an Execute event handler for the RibbonCommand and do something like
this in the event handler function:

private void OnCopy(object sender, ExecutedRoutedEventArgs e)
{
RoutedCommand command = ApplicationCommands.Copy;
command.Execute(sender, null);
}

If you have any questions or concerns, please feel free to let me know.

Best Regards,
Zhi-Xin Ye
Microsoft Managed Newsgroup Support Team

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
Daniel
Guest
Posts: n/a
 
      5th Jan 2009
That works. Thanks a lot.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Execute Batch Command Automatically form Command Shell with Minlogon stuie_norris@yahoo.com.au Windows XP Embedded 1 21st May 2010 12:26 PM
Data shape command text contains a syntax error at or near position 106 in the command. Bob Microsoft Access ADP SQL Server 3 14th Apr 2008 09:43 PM
Pivot Table Error Message - "Command Text not set for command obje =?Utf-8?B?SmVmZiBEaXZpYW4=?= Microsoft Excel Misc 0 7th Nov 2007 10:26 PM
autorun.inf - shell\..\command with command line parameter doesn'twork kakii Windows XP Help 1 17th May 2007 08:54 PM
A resource kit command that allows the NET USER command to get info strictly from a specific container or OU =?Utf-8?B?Ym9vNzc3?= Microsoft Windows 2000 Active Directory 3 11th May 2004 08:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:00 PM.