Hi,
We are about to set theme of ribbon to Office2013. The issue is that Loaded event will be fired twice when we set theme in either code behind or in xaml.
The interesting thing is this only happens to Office2013. The loaded event will only be fired once if we set the theme to Offcie2010 or not setting theme at all.
Can you please help us to understand why it got fired twice? or event better give us advice to avoid the scenario?
Thanks,
Qing
Hello,
Thank you for your post.
I have been looking into it. I created a sample application based on your scenario and I could not managed to reproduce the behavior that you have described. If you are not able to reproduce the issue with the attached sample application, would you please modify it with the functionality, that you are using, so it reproduces the issue. This way I would be able to further investigate this for you and provide you with more detailed information on this matter.
Looking forward to hearing from you.
I am just checking your progress on the issue that you are having.
If you require any further assistance please do not hesitate to ask
Thanks for following up.
I have looked at the example project you provided, which does not have the same issue. So I am not sure where the issue lies right now.
I will update the thread once I have some idea.
Thanks again.
Thank you for your feedback. Please let me know if you need any further assistance on the matter.
Hi Zhivko,
I haven't found the reason behind the issue yet. But I have another question regarding upgrading ApplicationMenu (Office2007 style) to ApplicationMenu2010.
The old Office2007 application menu style does not look good with Office2013 ribbon theme. So I decided to use AppplicationMenu2010 instead of ApplicationMenu. The problem is that after the modification, nothing is shown under the application menu. I have attached the code modification and screenshot below.
Before modification:
<igRibbon:XamRibbon.ApplicationMenu> <igRibbon:ApplicationMenu Image="{Binding AppIcon}" ItemsSource="{Binding AppMenu}"> <igRibbon:ApplicationMenu.ItemContainerStyle> <Style TargetType="{x:Type igRibbon:ToolMenuItem}"> <Setter Property="Header" Value="{Binding Caption}" /> <Setter Property="Icon" Value="{Binding Icon}" /> <Setter Property="Command" Value="{Binding Command}" /> <Setter Property="InputGestureText" Value="{Binding InputGestureText}" /> <Style.Triggers> <DataTrigger Binding="{Binding IsSeparator}" Value="{x:Static sys:Boolean.TrueString}" > <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igRibbon:ToolMenuItem}"> <Separator HorizontalAlignment="Stretch" IsEnabled="False" /> </ControlTemplate> </Setter.Value> </Setter> </DataTrigger> </Style.Triggers> </Style> </igRibbon:ApplicationMenu.ItemContainerStyle> </igRibbon:ApplicationMenu></igRibbon:XamRibbon.ApplicationMenu>
After modification:
<igRibbon:XamRibbon.ApplicationMenu2010> <igRibbon:ApplicationMenu2010 Caption="File" ItemsSource="{Binding AppMenu}"> <igRibbon:ApplicationMenu2010.ItemContainerStyle> <Style TargetType="{x:Type igRibbon:ApplicationMenu2010Item}"> <Setter Property="Header" Value="{Binding Caption}" /> <Setter Property="Image" Value="{Binding Icon}" /> <Setter Property="Command" Value="{Binding Command}" /> <!-- <Setter Property="InputGestureText" Value="{Binding InputGestureText}" />--> <Style.Triggers> <DataTrigger Binding="{Binding IsSeparator}" Value="{x:Static sys:Boolean.TrueString}" > <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igRibbon:ApplicationMenu2010Item}"> <igRibbon:ApplicationMenu2010Separator HorizontalAlignment="Stretch" IsEnabled="False" /> </ControlTemplate> </Setter.Value> </Setter> </DataTrigger> </Style.Triggers> </Style> </igRibbon:ApplicationMenu2010.ItemContainerStyle> </igRibbon:ApplicationMenu2010></igRibbon:XamRibbon.ApplicationMenu2010>
After the change, it looks good.
But nothing is shown if I click on File tab.