本文介绍了如何在WPF中圈出表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
—SA
Please see my comment to the question. Is that what you need?
If so, one of the way to do it is to assign some instance of System.Windows.Media.Geometry of non-rectangular shape to the property System.Windows.Window.VisualClip:
msdn.microsoft/en-us/library/system.windows.window.aspx[^],
msdn.microsoft/en-us/library/system.windows.media.visual.visualclip.aspx[^],
msdn.microsoft/en-us/library/system.windows.media.geometry.aspx[^].
This method is the cleanest one: not only a window looks non-rectangular visually (like it would look with transparency), but is also transparent to mouse events, for example: you click mouse in the corner; and the window of the application beneath is activated — this is something you really need.
It''s also good to use WindowStyle="None"; to avoid showing non-client areas of the window.
Another way is related to Background, AllowsTransparency, and WindowStyle properties:
msdn.microsoft/en-us/library/ms748948.aspx[^] (read: "Non-Rectangular Window Style"),
msdn.microsoft/en-us/library/aa358516%28v=vs.85%29.aspx[^].
Good luck,
—SA
大家好... 我想在WPF中进行登录屏幕.它将圈出表格.
Hello everybody... i want to make login screen in wpf. it will circle form. is it possible ?
推荐答案这可能是您正在寻找的东西:成形的WPF表单 [ ^ ] This might be what you are looking for: Shaped WPF Form[^]
请参阅我对问题的评论.那是你需要的吗? 如果是这样,执行此操作的方法之一是将非矩形形状的System.Windows.Media.Geometry的某些实例分配给属性System.Windows.Window.VisualClip: msdn.microsoft/en-us/library/system.windows. window.aspx [^ ], msdn.microsoft/en-us/library/system.windows.media.visual.visualclip.aspx [ ^ ], msdn.microsoft/en-us/library/system. windows.media.geometry.aspx [ ^ ]. 此方法是最干净的方法:不仅窗口在视觉上看起来不是矩形的(就像它看起来是透明的一样),而且对鼠标事件也是透明的,例如:单击角落的鼠标;然后单击鼠标.并激活了下面的应用程序的窗口-这是您真正需要的. 最好使用WindowStyle="None";来避免显示窗口的非客户区域. 另一种方法与Background,AllowsTransparency和WindowStyle属性有关: msdn.microsoft/en-us/library/ms748948.aspx [ ^ ](阅读:非矩形窗口样式"), msdn.microsoft/en-us/library/aa358516%28v = vs.85%29.aspx [ ^ ]. 祝你好运,
更多推荐
如何在WPF中圈出表格?
发布评论