Ribbon Icons from WPF Canvas

Nov 13, 2014 at 1:49 PM
has anyone managed to do this? I'm having a fair bit of trouble rendering images at all.

as well as accessing a resource dictionary from my Excel-DNA Add-In. (using the below code)
 public T GetFromResourcesDictionary<T>(string resourceName)
            where T : FrameworkElement
        {
            try
            {
                if (!UriParser.IsKnownScheme("pack"))
                {
                    UriParser.Register(new GenericUriParser(GenericUriParserOptions.GenericAuthority), "pack", -1);
                }

                var uri = new Uri(@"pack://application:,,,/Test.ExcelAddIn;component/Resources/Resources=Dictionary.xaml");

                var resourceDictionary = new ResourceDictionary
                {
                    Source = uri //new Uri(resourceDictionary, UriKind.RelativeOrAbsolute)
                };

                var rv = (T)resourceDictionary.FindName(resourceName);

                return rv;
            }
            catch (Exception e)
            {
                Debug.WriteLine("No item found:" + e.Message);
                return default(T);
            }
        }
are there any examples out there?