or
private void Process_Tiff(BookView wpfbook, string TempFile) { RemoveOldFiles(); //Sets each page to an image Image img = Image.FromFile(TempFile); int count = img.GetFrameCount(FrameDimension.Page); List<BookItem> MyBook = new List<BookItem>(); for (int idx = 0; idx < count; idx++) { img.SelectActiveFrame(FrameDimension.Page, idx); int currentpage = idx + 1; string TempPageFile = DefaultPath + DocOcc.ToString() + currentpage.ToString() + ".TIFF"; // and then create a new Image from it img.Save(TempPageFile); dFile df = new dFile(); df.File_Path = TempPageFile; FileList.Add(df); MyBook.Add(new BookItem() { Title = TempPageFile }); } img.Dispose(); wpfbook.RadBook1.ItemsSource = MyBook; } private void RemoveOldFiles() { ((BookView)((ElementHost)panel1.Controls[0]).Child).RadBook1.ItemsSource = null; int count = 0; IList<dFile> holddf = new List<dFile>(); foreach (dFile dfrow in FileList) { try { File.Delete(dfrow.File_Path); count++; } catch { dFile df = new dFile(); df.File_Path = dfrow.File_Path; holddf.Add(df); count++; } } FileList = holddf; }RadPane realPane = null;IEnumerable<RadPane> childPanes = MainDockingManager01.ChildrenOfType<RadPane>();foreach (var r in childPanes) if ((r as RadPane).Title.Equals(theName)) { realPane = r; break; }return realPane;<Window x:Class="TestingGridViewControl.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" DataContext='{Binding RelativeSource={RelativeSource Mode=Self}}' > <Grid> <telerik:RadGridView ItemsSource='{Binding Items}' AutoGenerateColumns='False' EnableColumnVirtualization='True' IsReadOnly='True' > <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Header='One' DataMemberBinding='{Binding One}' /> <telerik:GridViewDataColumn Header='Two' DataMemberBinding='{Binding Two}' /> <telerik:GridViewDataColumn Header='Three' DataMemberBinding='{Binding Three}' /> </telerik:RadGridView.Columns> </telerik:RadGridView> </Grid> </Window>using System.Collections.ObjectModel;using System.Dynamic;using System.Reflection;using System.Windows;namespace TestingGridViewControl{ /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); SetData(); } private void SetData() { Items = new ObservableCollection<ViewModel> { new ViewModel(new Model { Two = "2", Three = "3", }) {One = "1"}, new ViewModel(new Model { Two = "22", Three = "33", }) {One = "11"}, }; } public ObservableCollection<ViewModel> Items { get; set; } } public class ViewModel : DynamicObject { private Model _model; public ViewModel(Model model) { _model = model; } public string One { get; set; } public override bool TryGetMember(GetMemberBinder binder, out object result) { MethodInfo getMethod; // If VM has this property, VM takes precedence. // Otherwise, check for property in the Model. var vmPropInfo = GetType().GetProperty(binder.Name); if (vmPropInfo != null && vmPropInfo.CanRead) { getMethod = vmPropInfo.GetGetMethod(); result = getMethod.Invoke(this, null); return true; } var modelPropInfo = typeof(Model).GetProperty(binder.Name); if (modelPropInfo != null && modelPropInfo.CanRead) { getMethod = modelPropInfo.GetGetMethod(); result = getMethod.Invoke(_model, null); return true; } result = null; return false; } public override bool TrySetMember(SetMemberBinder binder, object value) { MethodInfo setMethod; var vmPropInfo = GetType().GetProperty(binder.Name); if (vmPropInfo != null && vmPropInfo.CanWrite) { setMethod = vmPropInfo.GetSetMethod(); setMethod.Invoke(this, new[] { value }); return true; } var modelPropInfo = typeof(Model).GetProperty(binder.Name); if (modelPropInfo != null && modelPropInfo.CanRead) { setMethod = modelPropInfo.GetSetMethod(); setMethod.Invoke(_model, new[] { value }); return true; } return false; } } public class Model { public string Two { get; set; } public string Three { get; set; } }}DTSTART;TZID=E. Australia Standard Time:20111225T050000DTEND;TZID=E. Australia Standard Time:20111225T120000SUMMARY:Test recurrenceUID:a49ee7e8-7813-4348-b7d7-0fdba1934521IMPORTANCE:NoneRRULE:FREQ=DAILY;UNTIL=20120103T020000Z;INTERVAL=2;BYDAY=SU,MO,TU,WE,TH,FR, SA
END:VEVENT