English 中文(简体)
在丝带控制上绘制窗口按钮
原标题:Painting window buttons over ribbon control
  • 时间:2012-05-23 21:27:42
  •  标签:
  • c#
  • wpf
  • ribbon

我想达到类似于MS OFFice那样的外观和感觉,我实施丝带控制,但遇到一些问题。

我的第一个问题 : < / strong> 如图片所示, 我认为MS Office在 Ribbon Control 控制台顶部使用无边框的形式/ 窗口和“ 画” 最小化/ 磁场化/ 关闭按钮。 (我不确定我是否只是从过去记忆中猜到。 ) 如何做这个或类似的事情来达到MS Office 。

my second question: I doing something but don't know what. 我添加了丝带控制,但无法添加所看到的图像>。当我使用以下代码时,它不会在设计时丢出错误。 (如果我更改文件名称, 它会在设计时丢出一个错误, 说没有这样的文件 。)

<RibbonButton x:Name="QATButton2" SmallImageSource="Resources/b.bmp" />

但它在运行时抛出这个错误 。

在系统上提供值。 Windows. Baml2006. Type Converter MarkupExtension 丢弃了一个例外。 行号 28 和行号 位置 35 。

""https://i.sstatic.net/PfGkD.png" alt="此处输入图像描述"/ >

最佳回答
问题回答

这个例外应该有一个 < code> Innerexption 属性, 您可以查看问题的根源。 我会在视觉工作室里钻进去 。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签