久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <small id='9SMMP'></small><noframes id='9SMMP'>

          <bdo id='9SMMP'></bdo><ul id='9SMMP'></ul>
        <legend id='9SMMP'><style id='9SMMP'><dir id='9SMMP'><q id='9SMMP'></q></dir></style></legend>
      1. <tfoot id='9SMMP'></tfoot>
        <i id='9SMMP'><tr id='9SMMP'><dt id='9SMMP'><q id='9SMMP'><span id='9SMMP'><b id='9SMMP'><form id='9SMMP'><ins id='9SMMP'></ins><ul id='9SMMP'></ul><sub id='9SMMP'></sub></form><legend id='9SMMP'></legend><bdo id='9SMMP'><pre id='9SMMP'><center id='9SMMP'></center></pre></bdo></b><th id='9SMMP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='9SMMP'><tfoot id='9SMMP'></tfoot><dl id='9SMMP'><fieldset id='9SMMP'></fieldset></dl></div>

        在 wpf 中拖放路徑

        Drag and drop a path in a wpf(在 wpf 中拖放路徑)
        1. <tfoot id='E1VIs'></tfoot>
          • <legend id='E1VIs'><style id='E1VIs'><dir id='E1VIs'><q id='E1VIs'></q></dir></style></legend>

              <tbody id='E1VIs'></tbody>
              <bdo id='E1VIs'></bdo><ul id='E1VIs'></ul>

                  <i id='E1VIs'><tr id='E1VIs'><dt id='E1VIs'><q id='E1VIs'><span id='E1VIs'><b id='E1VIs'><form id='E1VIs'><ins id='E1VIs'></ins><ul id='E1VIs'></ul><sub id='E1VIs'></sub></form><legend id='E1VIs'></legend><bdo id='E1VIs'><pre id='E1VIs'><center id='E1VIs'></center></pre></bdo></b><th id='E1VIs'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='E1VIs'><tfoot id='E1VIs'></tfoot><dl id='E1VIs'><fieldset id='E1VIs'></fieldset></dl></div>
                1. <small id='E1VIs'></small><noframes id='E1VIs'>

                  本文介紹了在 wpf 中拖放路徑的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  是否可以使用鼠標(biāo)事件處理程序在 wpf 中拖放路徑?特別是我想用鼠標(biāo)左鍵拖動一條路徑并將其鼠標(biāo)放在網(wǎng)格上.如何做到這一點?

                  Is it possible to drag and drop a path in a wpf using Mouse Eventhandlers? In partcular I want to drag a path with the left mouse button and to mouse it on the grid. How can this be done?

                  推薦答案

                  試試這個:

                  鑒于:文本框名稱為TextBox1"

                  Given: TextBox name is "TextBox1"

                      public MainWindow()
                      {
                          // Initialize UI
                          InitializeComponent();
                  
                          // Loaded event
                          this.Loaded += delegate
                              {
                                  TextBox1.AllowDrop = true;
                                  TextBox1.PreviewDragEnter += TextBox1PreviewDragEnter;
                                  TextBox1.PreviewDragOver += TextBox1PreviewDragOver;
                                  TextBox1.Drop += TextBox1DragDrop;
                              };
                      }
                  
                      /// <summary>
                      /// We have to override this to allow drop functionality.
                      /// </summary>
                      /// <param name="sender"></param>
                      /// <param name="e"></param>
                      void TextBox1PreviewDragOver(object sender, DragEventArgs e)
                      {
                          e.Handled = true;
                      }
                  
                      /// <summary>
                      /// Evaluates the Data and performs the DragDropEffect
                      /// </summary>
                      /// <param name="sender"></param>
                      /// <param name="e"></param>
                      private void TextBox1PreviewDragEnter(object sender, DragEventArgs e)
                      {
                          if (e.Data.GetDataPresent(DataFormats.FileDrop))
                          {
                              e.Effects = DragDropEffects.Copy;
                          }
                          else
                          {
                              e.Effects = DragDropEffects.None;
                          }
                      }
                  
                      /// <summary>
                      /// The drop activity on the textbox.
                      /// </summary>
                      /// <param name="sender"></param>
                      /// <param name="e"></param>
                      private void TextBox1DragDrop(object sender, DragEventArgs e)
                      {
                          // Get data object
                          var dataObject = e.Data as DataObject;
                  
                          // Check for file list
                          if (dataObject.ContainsFileDropList())
                          {
                              // Clear values
                              TextBox1.Text = string.Empty;
                  
                              // Process file names
                              StringCollection fileNames = dataObject.GetFileDropList();
                              StringBuilder bd = new StringBuilder();
                              foreach (var fileName in fileNames)
                              {
                                  bd.Append(fileName + "
                  ");
                              }
                  
                              // Set text
                              TextBox1.Text = bd.ToString();
                          }
                      }
                  

                  這篇關(guān)于在 wpf 中拖放路徑的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                  XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                  Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標(biāo)簽的 XML)
                  Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、單元格)
                  delete element from xml using LINQ(使用 LINQ 從 xml 中刪除元素)
                  Parse malformed XML(解析格式錯誤的 XML)
                    <tbody id='zOJTz'></tbody>
                  <legend id='zOJTz'><style id='zOJTz'><dir id='zOJTz'><q id='zOJTz'></q></dir></style></legend>

                        <bdo id='zOJTz'></bdo><ul id='zOJTz'></ul>
                        1. <small id='zOJTz'></small><noframes id='zOJTz'>

                          <i id='zOJTz'><tr id='zOJTz'><dt id='zOJTz'><q id='zOJTz'><span id='zOJTz'><b id='zOJTz'><form id='zOJTz'><ins id='zOJTz'></ins><ul id='zOJTz'></ul><sub id='zOJTz'></sub></form><legend id='zOJTz'></legend><bdo id='zOJTz'><pre id='zOJTz'><center id='zOJTz'></center></pre></bdo></b><th id='zOJTz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zOJTz'><tfoot id='zOJTz'></tfoot><dl id='zOJTz'><fieldset id='zOJTz'></fieldset></dl></div>
                          • <tfoot id='zOJTz'></tfoot>
                          • 主站蜘蛛池模板: 久久久久免费 | 欧美日韩在线视频观看 | 国产一区二区三区四区 | 国产高清视频在线 | 91视频在线观看视频 | 香蕉视频在线看 | 国产精品99久久久久久久久久久久 | 欧美精品一区二区三区四区 | 日韩欧美黄色片 | 久久久夜夜夜 | 国产黄av | 日本不卡在线 | 欧美午夜精品一区二区三区 | 欧美激情一二三区 | 国产精品久久久精品 | www.男人的天堂 | 国产伦精品一区二区三区视频黑人 | www中文字幕 | 一区二区三区久久久 | 九九在线精品 | 欧美激情一区二区 | 免费h片 | 91爱爱网 | 国产免费自拍视频 | 久久久午夜 | 波多野结衣一区二区三区在线观看 | 超碰麻豆 | 久久一区二区视频 | 一区二区在线看 | 中文字幕免费在线看线人动作大片 | 成人小视频在线 | 日日操夜夜 | 久久久中文字幕 | 成av人片在线观看www | 夜夜操av| 欧美日韩在线不卡 | 538在线观看 | 九九在线 | 亚洲天堂中文字幕 | 91精品久久久久 | 在线一区二区三区四区 |