or
<UserControl> <UserControl.Resources> <c:InfoBaseViewModel x:Key="InfoBaseViewModel2"/> </UserControl.Resources> <DockPanel Name="InfoDockPanel" DataContext="{StaticResource InfoBaseViewModel2}"> <telerik:RadGridView x:Name="grdInfo" AutoGenerateColumns="False" IsReadOnly="True" ItemsSource="{Binding Path=InfoList}" ShowGroupPanel="False"> <telerik:GridViewDataColumn> <telerik:GridViewDataColumn.Header> <CheckBox Name="chkAll" CommandParameter="{Binding ElementName=chkAll}" Command="{Binding AllCheckedCommand,Source={StaticResource InfoBaseViewModel2}}" ></CheckBox> </telerik:GridViewDataColumn.Header> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <CheckBox IsChecked="{Binding Path=IsItemSelected, Mode=TwoWay}"></CheckBox> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> <telerik:GridViewDataColumn DataMemberBinding="{Binding FullName}" Header="{Binding Path=ApplicationStrings.FullNameLabel, Source={StaticResource ResourceWrapper}}"></telerik:GridViewDataColumn> </telerik:GridViewDataColumn> </telerik:RadGridView> </DockPanel></UserControl>public ICommand AllCheckedCommand{ get { return _allItemsChecked ?? (_allItemsChecked = new RelayCommand(AllCheckedHandler, null)); }}public void AllCheckedHandler(object sender){ // Always gets to here... var chkAll = sender as System.Windows.Controls.CheckBox; if (chkAll == null) { // ...but always fails Logger.Error("Error binding the 'Select All' checkbox."); } else { foreach (var item in InfoList) { item.IsItemSelected = (bool)chkAll.IsChecked; } base.OnPropertyChanged("InfoList"); }}grd.MaxHeight = double.PositiveInfinity;grd.ScrollIntoView(objSel);grdMain.ScrollIntoView(objSel);grd.BringIntoView();<DataTemplate x:Key="AttributeContentTemplate"> <Grid> <Canvas ClipToBounds="False"> <TextBlock Text="{Binding Name}" FontWeight="{Binding IsBoldText,Converter={StaticResource FontWeightBooleanConverter}}" FontStyle="{Binding IsItalicText,Converter={StaticResource FontStyleBooleanConverter}}"> </TextBlock> </Canvas> </Grid> </DataTemplate>StyleManager.ApplicationTheme = new Windows8Theme();