private void ColorPickerGallery_SelectedItemChanged(object sender, ObjectPropertyChangedRoutedEventArgs e) { //var brush = e.NewValue as SolidColorBrush; //if (brush == null) return; //Background_Element.Value = brush.Color; //Background_Element.IsDropDownOpen = false; }
/// <summary> /// Gets the BreadCrumb selected item /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param> private void BreadcrumbSelectedItemChanged(object sender, ObjectPropertyChangedRoutedEventArgs e) { if (e.NewValue.GetType().Name == Constants.WorkspaceItem) { if (!_isloaded) { Vm.EventBroker.RaiseGetChild(new LoadWorkspaceItemEventArgs { WorkspaceId = ((WorkspaceItem)e.NewValue).Id, ItemId = ((WorkspaceItem)e.NewValue).ItemId }); } _isloaded = false; if (((WorkspaceItem)e.NewValue).Children != null) { if (((WorkspaceItem)e.NewValue).Children.Length != 0) { UpdateComboBoxItems(); // UpdateSelectedItems(); #region "Unused code" //Raise this event to set the listem to the workspace browser based on selected menu item //Vm.EventBroker.RaiseLoadDetailView(new LoadDetailViewEventArgs //{ // ListItem = // Vm.LoadListItem(((WorkspaceItem)e.NewValue).Children) //}); //Raise this event to get the listitem // Vm.EventBroker.RaiseGetWorkspaceId(new LoadWorkspaceItemEventArgs { WorkspaceId = ((WorkspaceItem)e.NewValue).Id, ItemId = ((WorkspaceItem)e.NewValue).ItemId }); // We will get the trail to the item selected in the Breadcrumb and use that to select the item in the TreeView //IList trail = ConvertItemHelper.GetTrail(breadcrumb.RootItem, breadcrumb.SelectedItem); //if (null != trail && 0 != trail.Count) // SelectItem(Treeview, trail, 0); #endregion } } } }
/// <summary> /// Handles the SelectedItemChanged event of the breadcrumb control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="PropertyChangedRoutedEventArgs{object}"/> instance containing the event data.</param> private void OnBreadcrumbSelectedItemChanged(object sender, ObjectPropertyChangedRoutedEventArgs e) { if (this.synchronizingSelection) { return; } this.synchronizingSelection = true; try { UpdateComboBoxItems(); // We will get the trail to the item selected in the Breadcrumb and use that to select the item in the TreeView IList trail = ConvertItemHelper.GetTrail(this.breadcrumb.RootItem, this.breadcrumb.SelectedItem); if (null != trail && 0 != trail.Count) { SelectItem(this.treeView, trail, 0); } } finally { this.synchronizingSelection = false; } }
/// <summary> /// Handles the SelectedItemChanged event of the breadcrumb control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="PropertyChangedRoutedEventArgs{object}"/> instance containing the event data.</param> private void OnBreadcrumbSelectedItemChanged(object sender, ObjectPropertyChangedRoutedEventArgs e) { UpdateRecentItems(); }