• <small id='vziqf'></small><noframes id='vziqf'>

      <bdo id='vziqf'></bdo><ul id='vziqf'></ul>
    <i id='vziqf'><tr id='vziqf'><dt id='vziqf'><q id='vziqf'><span id='vziqf'><b id='vziqf'><form id='vziqf'><ins id='vziqf'></ins><ul id='vziqf'></ul><sub id='vziqf'></sub></form><legend id='vziqf'></legend><bdo id='vziqf'><pre id='vziqf'><center id='vziqf'></center></pre></bdo></b><th id='vziqf'></th></span></q></dt></tr></i><div id='vziqf'><tfoot id='vziqf'></tfoot><dl id='vziqf'><fieldset id='vziqf'></fieldset></dl></div>
        <legend id='vziqf'><style id='vziqf'><dir id='vziqf'><q id='vziqf'></q></dir></style></legend><tfoot id='vziqf'></tfoot>
      1. 按住鼠标的 WPF 日历控件

        时间:2023-08-26
        • <i id='0ALh4'><tr id='0ALh4'><dt id='0ALh4'><q id='0ALh4'><span id='0ALh4'><b id='0ALh4'><form id='0ALh4'><ins id='0ALh4'></ins><ul id='0ALh4'></ul><sub id='0ALh4'></sub></form><legend id='0ALh4'></legend><bdo id='0ALh4'><pre id='0ALh4'><center id='0ALh4'></center></pre></bdo></b><th id='0ALh4'></th></span></q></dt></tr></i><div id='0ALh4'><tfoot id='0ALh4'></tfoot><dl id='0ALh4'><fieldset id='0ALh4'></fieldset></dl></div>

            • <legend id='0ALh4'><style id='0ALh4'><dir id='0ALh4'><q id='0ALh4'></q></dir></style></legend>

                  <bdo id='0ALh4'></bdo><ul id='0ALh4'></ul>
                    <tbody id='0ALh4'></tbody>

                  <small id='0ALh4'></small><noframes id='0ALh4'>

                • <tfoot id='0ALh4'></tfoot>
                  本文介绍了按住鼠标的 WPF 日历控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  因此,我在 VS2010 的全新 WPF 应用程序中删除了 MainWindow.xaml 上的标准 WPF Calendar 控件.如果我单击日历中的某一天,然后尝试单击应用程序的关闭按钮,我必须在关闭按钮上单击两次才能接受单击.就好像 Calendar 没有释放鼠标来与应用程序的其余部分进行交互一样.

                  So I dropped the standard WPF Calendar control on the MainWindow.xaml in a brand new WPF App in VS2010. If I click on a day in the calendar and then try to click the Close button for the app, I have to click twice on the close button before it accepts the click. It's acting as if the Calendar hasn't released the Mouse to interact with the rest of the application.

                  我已将 Focusable 更改为 false,但效果没有任何变化,我已尝试覆盖 PreviewOnMouseUp 并调用 ReleaseMouseCapture() 无济于事.我对 MouseLeaveMouseLeftButtonUp 做了同样的事情,结果相同.鉴于这些事情都不起作用,我怀疑我在叫错树.谷歌没有发现任何值得注意的东西,但也许我的 GoogleFu 今天还达不到标准.

                  I've changed Focusable to false, with no change in effect, and I've tried overriding the PreviewOnMouseUp and calling ReleaseMouseCapture() to no avail. I've done the same thing with MouseLeave and MouseLeftButtonUp with the same result. Given that none of those things are working I suspect I'm barking up the wrong tree. Google has turned up nothing of note, though perhaps my GoogleFu is not up to snuff today.

                  有什么想法吗?

                  推荐答案

                  您可以通过使用如下处理程序订阅日历的 PreviewMouseUp 事件来更改此行为:

                  You can change this behavior by subscribing to the calendar's PreviewMouseUp event with a handler like this:

                  private void Calendar_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
                  {
                      if (Mouse.Captured is CalendarItem)
                      {
                          Mouse.Capture(null);
                      }
                  }
                  

                  这篇关于按住鼠标的 WPF 日历控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何创建包含多个 VEVENT 的 .ICS 文件以导入现有 下一篇:回历和公历 DateTime 构造函数

                  相关文章

                  最新文章

                    <tfoot id='gUVg3'></tfoot>

                  1. <legend id='gUVg3'><style id='gUVg3'><dir id='gUVg3'><q id='gUVg3'></q></dir></style></legend>

                      <small id='gUVg3'></small><noframes id='gUVg3'>

                    1. <i id='gUVg3'><tr id='gUVg3'><dt id='gUVg3'><q id='gUVg3'><span id='gUVg3'><b id='gUVg3'><form id='gUVg3'><ins id='gUVg3'></ins><ul id='gUVg3'></ul><sub id='gUVg3'></sub></form><legend id='gUVg3'></legend><bdo id='gUVg3'><pre id='gUVg3'><center id='gUVg3'></center></pre></bdo></b><th id='gUVg3'></th></span></q></dt></tr></i><div id='gUVg3'><tfoot id='gUVg3'></tfoot><dl id='gUVg3'><fieldset id='gUVg3'></fieldset></dl></div>
                        <bdo id='gUVg3'></bdo><ul id='gUVg3'></ul>