public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { RibbonThumbnail tn = value as RibbonThumbnail; if (tn == null) { return(value); } string s = System.IO.Path.GetFileName(tn.ImageSource.ToString()); return(s); }
private void RibbonGallery_HotThumbnailChanged(object sender, RoutedEventArgs e) { RibbonGallery g = sender as RibbonGallery; RibbonThumbnail thumb = g.HotThumbnail; if (thumb != null) { SkinManager.SkinId = IdToSkin(g.Items.IndexOf(g.HotItem)); } else { SkinManager.SkinId = Skin; } }