private Control CreateBookControl(string name) { BookItem b = new BookItem(); //Style s = TryFindResource("Rotated") as Style; b.x_bookname.Content = GetTitle(name); b.x_open_for_writing.DataContext = name; b.x_open_for_writing.Click += new RoutedEventHandler(Write); b.x_open_for_reading.Click += new RoutedEventHandler(Read); return(b); }
private void settingButton_Click(object sender, RoutedEventArgs e) { if (OnSettingsPage == null) { return; } BookItem ctrl = sender as BookItem; OnSettingsPage(); // name of the book }
private void CreateNew(object sender, RoutedEventArgs e) { BookItem ctrl = sender as BookItem; NewBook(); }