LoadImage method does not fire on my ribbon viewmodel

May 21, 2013 at 11:26 AM
LoadImage does not seem to fire for ribbon items that use custom images and declared with the "image" tag. Is this a bug?

Thanks
Coordinator
May 28, 2013 at 12:03 PM
It very well could be.

If you could provide a small reproduction solution, I will try to fix.
May 28, 2013 at 12:14 PM
I found the bug. A number of the methods in the RibbonFactory are not passed the index. See below. I think I found them all but worth another check.
     /// <summary>
    /// GetItemId callback
    /// </summary>
    /// <param name="control">The control.</param>
    /// <param name="index">The index.</param>
    /// <returns></returns>
    public string GetItemId(IRibbonControl control, int index)
    {
        return (string)_ribbonFactoryController.InvokeGet(control, () => GetItemId(null, 0), index);
    }

    /// <summary>
    /// GetItemLabel callback
    /// </summary>
    /// <param name="control">The control.</param>
    /// <param name="index">The index.</param>
    /// <returns></returns>
    public string GetItemLabel(IRibbonControl control, int index)
    {
        return (string)_ribbonFactoryController.InvokeGet(control, () => GetItemLabel(null, 0), index);
    }

    /// <summary>
    /// GetItemScreenTip callback
    /// </summary>
    /// <param name="control">The control.</param>
    /// <param name="index">The index.</param>
    /// <returns></returns>
    public string GetItemScreenTip(IRibbonControl control, int index)
    {
        return (string)_ribbonFactoryController.InvokeGet(control, () => GetItemScreenTip(null, 0), index);
    }

    /// <summary>
    /// GetItemSuperTip callback
    /// </summary>
    /// <param name="control">The control.</param>
    /// <param name="index">The index.</param>
    /// <returns></returns>
    public string GetItemSuperTip(IRibbonControl control, int index)
    {
        return (string)_ribbonFactoryController.InvokeGet(control, () => GetItemSuperTip(null, 0), index);
    }
Coordinator
Jul 31, 2013 at 11:48 AM
This will be fixed with the next release (aiming for the next week)
Coordinator
Aug 6, 2013 at 5:29 PM
Pushing the release now, look for v0.12