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
595
An item with the same key has already been added.
posted

Hi,

We're getting the below exception. We're using version 16.2 of the WinForms controls.

Can you please advise how can we proceed? How exactly can we know what is duplicate?

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Infragistics.Win.AppStyling.StyleUtilities.StyleHashtable`2.Add(TKey key, TValue value)
at Infragistics.Win.AppStyling.StyleUtilities.UpdateRoleHierarchy(StyleHashtable`2 table, AssemblyStyleInfo[] assemblyInfos)
at Infragistics.Win.AppStyling.StyleManager.ProcessLoadedAssembliesImpl()
at Infragistics.Win.AppStyling.StyleManager.ProcessLoadedAssemblies()
at Infragistics.Win.AppStyling.StyleManager.GetParentRole(String role)
at Infragistics.Win.AppStyling.StyleManager.CreateStyleInfo(UIRole role)
at Infragistics.Win.AppStyling.UIRole.UpdateCache()
at Infragistics.Win.AppStyling.UIRole.VerifyCache()
at Infragistics.Win.AppStyling.UIRole.ResolveAppearance(AppearanceData& appearance, AppearancePropFlags& requestedProps, RoleState state)
at Infragistics.Win.UltraWinDock.PaneSettingsResolved.ResolvePaneAppearance(AppearanceData& appearance, AppearancePropFlags& requestedProps, Boolean isActive)
at Infragistics.Win.UltraWinDock.PaneControlAreaUIElement.InitAppearance(AppearanceData& appearance, AppearancePropFlags& requestedProps)
at Infragistics.Win.UIElement.InitializeDrawAppearance(AppearanceData& defaultAppearance, AppearanceData& appearance)
at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams)
at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams)
at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams)
at Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams)
at Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams)
at Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics, Nullable`1 zoomFactor)
at Infragistics.Win.UIElement.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics, Nullable`1 zoomFactor)
at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics)
at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize)
at Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode)
at Infragistics.Win.ManagedContainerControlBase.OnPaint(PaintEventArgs pe)
at Infragistics.Win.UltraWinDock.WindowDockingArea.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Thanks,

Ziv

Parents
No Data
Reply
  • 12480
    Offline posted

    Hi Ziv,

    You might be able to identify the duplicated item by enabling first chance exceptions and breaking when this exception is fired. From there, you will be able to inspect the item and the collection.

    If you are able to send a reproduction sample, I will debug this for you and let you know why it happens and how to avoid it. Please let me know if you would prefer not to upload your sample on the public forum and I will create a private case for you.

Children
No Data