请帮忙!我在wpf中遇到了无边框窗口的问题。 [英] Please help! I'm having some problems with borderless windows in wpf.

查看:61
本文介绍了请帮忙!我在wpf中遇到了无边框窗口的问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我的所作所为:


  1. 选中"允许透明度""为窗口

  2. 为身体绘制一个矩形

  3. 添加了3个按钮:(他们执行正确的功能)

  4. 创建一个窗口:(蓝色)

  5. 蓝色部分是一个纠结。我突出显示了它,然后选择了工具> Make Button(它名为"drag")

  1. Checked "AllowsTransparency" for the window
  2. Drew a rectangle for the body
  3. Added 3 buttons:  (They do the correct functions)
  4. Made a window:  (Blue)
  5. The blue part was a recangle. I highlighted it, and then selected Tools > Make Button (It's named "drag")

我打开C#来编辑按钮的功能,并尝试了许多不同的方法来实现这个功能,包括this.DragMove;

谁能告诉我如何通过拖动蓝色部分移动窗口? (好像你在普通表格上拖动标题栏)

I opened C# to edit the function for the button and tried many different ways to get this to work, including this.DragMove;

Can anyone tell me how to move the window by dragging the blue part? (As if you were dragging the title bar on a normal form)

推荐答案

你好Thingula,你有什么事件与你的关联按钮的事件处理程序?点击?

欢呼!
Kirupa(MS)
Hi Thingula,
What event do you have associated with your button's event handler? Click?

Cheers!
Kirupa (MS)


这篇关于请帮忙!我在wpf中遇到了无边框窗口的问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆