or

| <telerik:GridViewColumn Header="Delete" IsVisible="True"> |
| <telerik:GridViewColumn.CellTemplate> |
| <DataTemplate> |
| <Button Width="18" Height="18" Margin="5,0" |
| Command="ApplicationCommands.Delete" CommandParameter="{Binding}" > |
| <Button.Content> |
| <Grid Width="8.083" Height="8.664" VerticalAlignment="Center" HorizontalAlignment="Center"> |
| <Path Fill="{x:Null}" Stretch="Fill" Stroke="#FF000000" Margin="0.083,0.664,0,0" Data="M0.50001547,0.5 L6.5000797,6.5000169 M6.5000155,0.5 L0.5,6.5000704" StrokeThickness="2"/> |
| <Path Fill="#FFCE3527" Stretch="Fill" Stroke="#FFCD3527" Margin="0,0,0.083,0.664" Data="M0.50001547,0.5 L6.5000797,6.5000169 M6.5000155,0.5 L0.5,6.5000704" StrokeThickness="2"/> |
| </Grid> |
| </Button.Content> |
| </Button> |
| </DataTemplate> |
| </telerik:GridViewColumn.CellTemplate> |
| </telerik:GridViewColumn> |
| public ucChartRegionGrid2() |
| { |
| InitializeComponent(); |
| this.Loaded += new RoutedEventHandler( ucChartRegionGrid2_Loaded ); |
| this.CommandBindings.Add( new CommandBinding( ApplicationCommands.Delete, |
| this.DeleteExecuted, this.DeleteCanExecute ) ); |
| radGridViewDataBinding.SelectionChanged += new |
| EventHandler<Telerik.Windows.Controls.SelectionChangeEventArgs>(radGridViewDataBinding_SelectionChanged); |
| } |
| public void DeleteCanExecute(object sender, CanExecuteRoutedEventArgs e) |
| { |
| e.CanExecute = true; |
| } |
| public void DeleteExecuted(object sender, ExecutedRoutedEventArgs e) |
| { |
| // set a breakpoint here. It’s not hit, but the row disappears from the grid!? |
| RegionEvent2 deleteRange = e.Parameter as RegionEvent2; |
private void textFilter_PreviewKeyDown(object sender, KeyEventArgs e) { switch (e.Key) { case Key.Down: { e.Handled = true; RoutedUICommand moveDownCommand = RadGridViewCommands.MoveDown as RoutedUICommand; RoutedUICommand selectCommand = RadGridViewCommands.SelectCurrentUnit as RoutedUICommand; moveDownCommand.Execute(null, this.radGridView); selectCommand.Execute(null, this.radGridView); break; } case Key.Up: { e.Handled = true; RoutedUICommand moveUpCommand = RadGridViewCommands.MoveUp as RoutedUICommand; RoutedUICommand selectCommand = RadGridViewCommands.SelectCurrentUnit as RoutedUICommand; moveUpCommand.Execute(null, this.radGridView); selectCommand.Execute(null, this.radGridView); break; } default: return; } textFilter.Focus();
}<Window x:Class="TestTelerikWpfApp.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:local="clr-namespace:TestTelerikWpfApp" Title="MainWindow" Height="300"> <Window.Resources> </Window.Resources> <Grid> <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=richTextBox}" Html="{Binding Path=Notes, Mode=TwoWay}" /> <telerik:RadRichTextBox Name="richTextBox" Width="800" Height="600" /> </Grid></Window>using System;using System.Collections.Generic;using System.Linq;using System.Windows;using System.Windows.Data;using Telerik.Windows.Controls;namespace TestTelerikWpfApp{ /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); DataContext = new ViewModel(); } }}using System;using Telerik.Windows.Controls;namespace TestTelerikWpfApp{ public class ViewModel : ViewModelBase { private String notes; public String Notes { get { if (null == notes) { Notes = String.Empty; } return this.notes; } set { if (value != this.notes) { this.notes = value; OnPropertyChanged(() => this.Notes); } } } }}