Accessing the CommandParameter

3 posts, 0 answers
  1. Henri
    Henri avatar
    77 posts
    Member since:
    Aug 2008

    Posted 29 Mar 2012 Link to this post


    I'm trying to implement a copy function.

    In XAML I did the following:
    <telerik:RadButton Command="telerik:RadDataFormCommands.AddNew" CommandTarget="{Binding ElementName=df}"
            ToolTip="Copy" CommandParameter="copy">
       <Image Source="Images/Copy.png"/>

    How can I get access to the CommandParameter "copy" in the code-behind so that I can determine that a copy is needed instead of a regular AddNew?

    Thanks in advance
  2. Ivan Ivanov
    Ivan Ivanov avatar
    1201 posts

    Posted 29 Mar 2012 Link to this post


    CommandParameter is a DependencyProperty. You can bind it to a property of your ViewModel.

    All the best,
    Ivan Ivanov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Bernard Grosperrin
    Bernard Grosperrin avatar
    2 posts
    Member since:
    Dec 2009

    Posted 19 Apr 2012 Link to this post

    Would it be possible to get an example for this ?
Back to Top