Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
365
Tag doesn't persist across Tool items
posted

Hi all,

Interesting that the Tag property isn't persisted across when you create a StateButtonTool.

 string tag = "StringFilter";

...

Infragistics.Win.UltraWinToolbars.StateButtonTool btnTool
    = new Infragistics.Win.UltraWinToolbars.StateButtonTool(key + "|" + clbi.Name);
btnTool.SharedPropsInternal.Category = "Filter";
btnTool.SharedPropsInternal.Caption = clbi.DisplayName;
btnTool.Tag = tag;
 
toolBase[i] = btnTool;
...
return toolBase;

At this point the Tag is "StringFilter"

But after adding the toolBase to the Toolbar.Tools collection:
this.ToolBar.Tools.AddRange(toolBase);
it disappears.  toolBase does have the tag property set, this.ToolBar.Tools does not.
I'm wondering if something wasn't copied over internally.

I kinda need that property :( or another i can set that isn't visible in the UI.
Parents
  • 21795
    Offline posted

    Hello Glenn,

    Based on the code snippet you provided I created a small sample project to test this behavior. When I run my sample project, I was unable to reproduce this behavior. The tag of the tool retained its value, after the tool was added to toolbars manager’s tools collection. Attached is the sample project I tested this with as well as a video I recorded during my test.

    Please run this sample at your side and let me know if you face the same issue. If you are able to reproduce this behavior, it most probably shows to a different in versions we are using or an issue in your environment. My test was performed with Infragistics for Windows Forms 2016 volume 2 with latest service release. Can you let me know the exact version of Infragistics you are using?

    If the sample does not shows the behavior you are describing can you provide a small sample project that shows this behavior. Alternatively, if my sample does not correctly reproduce what you are trying to achieve feel free to modify it and send it back to me.

    Looking forward to your reply.

    UltraToolbarsManagerToolsTags.zip
Reply Children