Telerik UI for Windows 8 XAML

Note

This command is associated with the DoubleTap event that occurs over a cell.

Here's an example where we first create a class that inherits from the DataGridCommand one and then add it to the RadDataGrid.Commands collection

C# Copy imageCopy
public class CustomCellDoubleTapped : DataGridCommand
{
    public CustomCellDoubleTapped()
    {
        this.Id = CommandId.CellDoubleTap;
    }

    public override bool CanExecute(object parameter)
    {
        var context = parameter as DataGridCellInfo;
        // put your custom logic here
        return true;
    }

    public override void Execute(object parameter)
    {
        var context = parameter as DataGridCellInfo;
        // put your custom logic here
    }
}

And the XAML declaration:

XAML Copy imageCopy
<telerikGrid:RadDataGrid>
    <telerikGrid:RadDataGrid.Commands>
        <local:CustomCellDoubleTapped/>
    </telerikGrid:RadDataGrid.Commands>
</telerikGrid:RadDataGrid>