[英]Reusing Image on Ribbon Causes Crash on XP
我正在使用WPF功能区,但遇到了一些奇怪的行为。 我有一个上下文选项卡,该选项卡复制了“主页”选项卡中的某些功能,因此我的用户不必来回点击。
我看到的问题是,如果我重复使用映像,并且在Windows XP上运行,我的应用程序将在启动时崩溃。 Windows 7上没有问题。有什么想法吗?
码:
<r:RibbonTab Header="Home">
<r:RibbonGroup Header="Clipboard">
<r:RibbonButton Label="Paste" LargeImageSource="Resources\Images\Paste.ico" Command="{Binding PasteCommand}"/>
<r:RibbonButton Label="Cut" SmallImageSource="Resources\Images\Cut.ico" Command="{Binding CutCommand}"/>
<r:RibbonButton Label="Copy" SmallImageSource="Resources\Images\Copy.ico" Command="{Binding CopyCommand}"/>
</r:RibbonGroup>
.... Other Code...
<r:RibbonTab Header="Options" ContextualTabGroupHeader="Options">
<r:RibbonTab.Style>
<Style TargetType="r:RibbonTab">
<Style.Triggers>
<Trigger Property="Visibility" Value="Visible">
<Setter Property="IsSelected" Value="True" />
</Trigger>
</Style.Triggers>
</Style>
</r:RibbonTab.Style>
.... If I uncomment this next part it crashes on XP....
<!--<r:RibbonGroup Header="Clipboard">
<r:RibbonButton Label="Paste" LargeImageSource="Resources\Images\Paste.ico" Command="{Binding PasteCommand}"/>
<r:RibbonButton Label="Cut" SmallImageSource="Resources\Images\Cut.ico" Command="{Binding CutCommand}"/>
<r:RibbonButton Label="Copy" SmallImageSource="Resources\Images\Copy.ico" Command="{Binding CopyCommand}"/>
</r:RibbonGroup>-->
如果我取出LargeImageSource / SmallImageSource部分,它可以正常工作。
不知道这是否对您有帮助。
发生了一段时间,我的应用程序在WinXP上崩溃了。 原来,我用于Windows的图标是。 XP系统似乎无法正确处理彩色,透明的大图标。 更改为小的非透明图像,并且开始工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.