protected internal ZapCommandItem(ZapScroller zapScroller, int index) { //Util.RequireNotNull(zapScroller, "zapScroller"); //Util.RequireArgumentRange(index >= 0, "index"); m_zapScroller = zapScroller; m_zapScroller.CurrentItemIndexChanged += delegate(object sender, RoutedPropertyChangedEventArgs <int> e) { OnCanExecuteChanged(EventArgs.Empty); }; m_index = index; m_content = m_zapScroller.Items[m_index]; }
public override void OnApplyTemplate() { base.OnApplyTemplate(); _uploadPhotoStatusTextBlock = Template.FindName("PART_UploadPhotoStatusTextBlock", this) as TextBlock; _albumPickerPage = Template.FindName("PART_AlbumPickerPage", this) as Panel; _uploadProgressPage = Template.FindName("PART_UploadProgressPage", this) as Panel; _zapScroller = Template.FindName("PART_ZapScroller", this) as ZapScroller; _albumsComboBox = Template.FindName("PART_AlbumsComboBox", this) as ComboBox; _albumName = Template.FindName("PART_AlbumName", this) as TextBox; _albumLocation = Template.FindName("PART_AlbumLocation", this) as TextBox; _albumDescription = Template.FindName("PART_AlbumDescription", this) as TextBox; _nextPhotoImage = Template.FindName("PART_NextPhotoImage", this) as Image; _uploadStatus = Template.FindName("PART_UploadStatus", this) as TextBlock; _closeCancelButton = Template.FindName("PART_CloseCancelButton", this) as Button; _albumName.TextChanged += new TextChangedEventHandler((sender, e) => CommandManager.InvalidateRequerySuggested()); _albumLocation.TextChanged += new TextChangedEventHandler((sender, e) => CommandManager.InvalidateRequerySuggested()); _albumDescription.TextChanged += new TextChangedEventHandler((sender, e) => CommandManager.InvalidateRequerySuggested()); _UpdatePhotoAlbums(); }
private static void isShuffled_changed(DependencyObject element, DependencyPropertyChangedEventArgs e) { ZapScroller zapScroller = (ZapScroller)element; zapScroller.OnIsShuffledChanged((bool)e.OldValue, (bool)e.NewValue); }
private static void playTimeInterval_changed(DependencyObject element, DependencyPropertyChangedEventArgs e) { ZapScroller zapScroller = (ZapScroller)element; zapScroller.OnPlayTimeIntervalChanged((int)e.OldValue, (int)e.NewValue); }
private static void currentItemIndex_changed(DependencyObject element, DependencyPropertyChangedEventArgs e) { ZapScroller zapScroller = (ZapScroller)element; zapScroller.OnCurrentItemIndexChanged((int)e.OldValue, (int)e.NewValue); }