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
330
StackOverflowException with QuickAccessToolbars
posted

Hello,

I am running into an issue with the XamRibbon. We have a WPF Page which has a ribbon it. This page gets used many times, meaning, Unloaded and Loaded will be called on this page and ribbon after each use. (The page is getting put into and removed from a Frame).  The issue occurs when we have quickaccess toolbars. If we set the IsEnabled state of the original button the quick access toolbar is pointing at, then we get the following exception during the second use of the ribbon.

An unhandled exception of type 'System.StackOverflowException' occurred in PresentationFramework.dll

The exception is thrown from this line:

btnRecordNext.IsEnabled = true;

 

Here is the QuickQccessToolbar definition:

 <igRibbon:QuickAccessToolbar>

  <igRibbon:QatPlaceholderTool TargetId="btnRecordPrevious" />

  <igRibbon:QatPlaceholderTool TargetId="btnRecordNext"/> 

</igRibbon:QuickAccessToolbar>

 Here are the button defintions:

<igRibbon:ButtonTool x:Name="btnRecordPrevious" Caption="{x:Static SunGard_PS_Finance_Resources:MenuResources.RecordPrevious}"  Id="btnRecordPrevious" Command="{SunGard_PS_WPF_Finance:FPSCommandBinder SunGard_PS_WPF_Finance:FPSRecordViewCommands.MovePrevious}" igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge" igRibbon:RibbonGroup.MinimumSize="ImageOnly" LargeImage="{DynamicResource L_ArrowLeft}" ToolTip="{x:Static SunGard_PS_Finance_Resources:TooltipResources.ButtonRecordPrevious}" />

 

 

 

<igRibbon:ButtonTool x:Name="btnRecordNext" Caption="{x:Static SunGard_PS_Finance_Resources:MenuResources .RecordNext}" Id="btnRecordNext"  Command="{SunGard_PS_WPF_Finance:FPSCommandBinder SunGard_PS_WPF_Finance:FPSRecordViewCommands.MoveNext}" igRibbon:RibbonGroup.MaximumSize="ImageAndTextLarge" igRibbon:RibbonGroup.MinimumSize="ImageOnly" LargeImage="{DynamicResource L_ArrowRight}" ToolTip="{x:Static SunGard_PS_Finance_Resources:TooltipResources.ButtonRecordNext}" /> 

 

Nothing else is hooked up to the buttons. It also only seems to occure when you have more than one item in the quick access toolbar. In this case, we have two items. If i remove either one of them, it will not happen, but as soon as i add a second, then the use starts happening again.

Any help on the matter would be much appreciated.

Thanks in advanced.

-Mike