void IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.syncPicturesText = (CheckBox) target; return; case 2: this.syncAllPictures = (CheckBox) target; return; case 3: this.syncIncludeVideo = (CheckBox) target; return; case 4: this.pictureAlbumsTreeView = (TreeListBox) target; return; case 5: this.cancelButton = (Button) target; return; case 6: this.syncButton = (Button) target; return; } this._contentLoaded = true; }
public static void TreeListBoxPreviewKeyDown(TreeListBox sender, KeyEventArgs e) { if (((sender != null) && (e != null)) && (e.Key == Key.Space)) { TreeListBoxInfo selectedItem = sender.SelectedItem as TreeListBoxInfo; if (selectedItem != null) { SelectableOptionViewModel dataItem = selectedItem.DataItem as SelectableOptionViewModel; dataItem.IsSelected = new bool?(dataItem.IsSelected.HasValue ? !dataItem.IsSelected.Value : false); } e.Handled = true; } }
public TreeListBoxItem(TreeListBox parent) { RoutedEventHandler handler = null; this.lastChildItemCreatedIndex = 1; this.isInitializing = true; this.treeListBox = parent; if (handler == null) { handler = delegate { if (!this.currentInfo.IsExpanded) { this.UnRegisterCollectionNotification(); } }; } base.Unloaded += handler; base.PreviewKeyDown += new KeyEventHandler(this.TreeListBoxItem_PreviewKeyDown); }
void IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.syncMusicCheckBox = (CheckBox) target; return; case 2: this.syncAllMusicCheckBox = (CheckBox) target; return; case 3: this.playlistsLabel = (Label) target; return; case 4: this.playlistsList = (ListBox) target; this.playlistsList.PreviewKeyDown += new KeyEventHandler(this.listBox_PreviewKeyDown); return; case 5: this.genresLabel = (Label) target; return; case 6: this.genresList = (ListBox) target; this.genresList.PreviewKeyDown += new KeyEventHandler(this.listBox_PreviewKeyDown); return; case 7: this.artistsLabel = (Label) target; return; case 8: this.artistsList = (TreeListBox) target; return; case 9: this.drmMessage = (TextBlock) target; return; case 10: this.cancelButton = (Button) target; return; case 11: this.syncButton = (Button) target; return; } this._contentLoaded = true; }