or
<telerik:RadScheduleView Name="_scheduleView" AppointmentsSource="{Binding Appointments}" Grid.Row="5" Grid.ColumnSpan="2" CurrentDate="2012-10-01" NavigationHeaderVisibility="Collapsed" MinAppointmentWidth="10" MinAppointmentHeight="5" ShowDialog="RadScheduleView_ShowDialog" ToolTipTemplate="{StaticResource AppointmentToolTipTemplate}" telerik:StyleManager.Theme="Metro"> <telerik:RadScheduleView.ViewDefinitions> <telerik:WeekViewDefinition FirstDayOfWeek="Monday" WeekGroupHeaderStringFormat="{}{0:dddd(MM/dd/yy)}"> </telerik:WeekViewDefinition> </telerik:RadScheduleView.ViewDefinitions> </telerik:RadScheduleView>private void playersGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
{ e.NewObject = new Player(); } private void playersGrid_RowEditEnded(object sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e) { if (e.EditAction == GridViewEditAction.Cancel) { return; } if ( e.EditAction == GridViewEditAction.Commit) { this.playersGrid.CurrentColumn = this.playersGrid.Columns.OfType<GridViewColumn>().First(); this.playersGrid.BeginInsert(); } }<Window x:Class="WpfApplication1.TestAutoComplete" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Title="TestAutoComplete" Height="100" Width="100" DataContext="{Binding TestAutoCompleteBinding, Source={StaticResource Locator}}"> <Grid> <StackPanel Orientation="Vertical"> <telerik:RadAutoCompleteBox ItemsSource="{Binding Source,Mode=TwoWay}" AutoCompleteMode="Suggest" SelectionMode="Single" SelectedItem="{Binding SelectedItem,Mode=TwoWay}" DisplayMemberPath="FirstName"/> <Button Command="{Binding TestCommand}" Content="test"/> </StackPanel> </Grid></Window>public class TestAutoCompleteViewModel : ViewModelBase { public ObservableCollection<Customer> _source; public ObservableCollection<Customer> Source { get { return this._source; } set { this._source = value; this.RaisePropertyChanged(() => this.Source); } } private ICommand _testCommand; public ICommand TestCommand { get { return this._testCommand; } } private Customer _selectedItem; public Customer SelectedItem { get { return this._selectedItem; } set { this._selectedItem = value; this.RaisePropertyChanged(() => this.SelectedItem); } } /// <summary> /// Initializes a new instance of the <see cref="TestAutoCompleteViewModel" /> class. /// </summary> public TestAutoCompleteViewModel() { var customers = new List<Customer>(); customers.Add(new Customer("testLast1", "testFirst1")); customers.Add(new Customer("testLast2", "testFirst2")); customers.Add(new Customer("testLast3", "testFirst3")); customers.Add(new Customer("testLast4", "testFirst4")); customers.Add(new Customer("testLast5", "testFirst5")); customers.Add(new Customer("testLast6", "testFirst6")); this.Source = new ObservableCollection<Customer>(customers); this._testCommand = new RelayCommand(() => { }, () => { return this.SelectedItem != null; }); } }