public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { CommandLinkIcon icon = CommandLinkIcon.None; if (value is CommandLinkIcon) { icon = (CommandLinkIcon)value; } return((icon != CommandLinkIcon.None) ? Visibility.Visible : Visibility.Collapsed); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { CommandLinkIcon icon = CommandLinkIcon.None; if (value is CommandLinkIcon) { icon = (CommandLinkIcon)value; } if (icon == CommandLinkIcon.None) { return(Visibility.Collapsed); } return((icon == CommandLinkIcon.Arrow ^ System.Convert.ToBoolean(parameter)) ? Visibility.Visible : Visibility.Collapsed); }
/// <summary> /// Raises the <see cref="E:System.Windows.Controls.CommandLink.IconChanged" /> routed event. /// </summary> /// <param name="oldValue"> /// Old value of the <see cref="P:System.Windows.Controls.CommandLink.Icon" /> property /// </param> /// <param name="newValue"> /// New value of the <see cref="P:System.Windows.Controls.CommandLink.Icon" /> property /// </param> protected virtual void OnIconChanged(CommandLinkIcon oldIcon, CommandLinkIcon newIcon) { RaiseIconChangedEvent(oldIcon, newIcon); }
private void RaiseIconChangedEvent(CommandLinkIcon oldIcon, CommandLinkIcon newIcon) { RaiseEvent(new RoutedPropertyChangedEventArgs <object>(oldIcon, newIcon, CommandLink.IconChangedEvent)); }
private void RaiseIconChangedEvent(CommandLinkIcon oldIcon, CommandLinkIcon newIcon) { RaiseEvent(new RoutedPropertyChangedEventArgs<object>(oldIcon, newIcon, CommandLink.IconChangedEvent)); }