太简单了,不知道怎么写,直接把代码放在这了:

  private void test_MouseDown(object sender, MouseButtonEventArgs e)

        {

        

            if (e.Source is TreeViewItem)

            {

                if (e.RightButton == MouseButtonState.Pressed)

                {

                    (e.Source as TreeViewItem).IsSelected = true;

                }

            }

        

        }

下载完整代码


相关文章:

  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
猜你喜欢
  • 2022-01-15
  • 2021-05-25
  • 2021-09-23
  • 2021-06-19
  • 2021-05-22
  • 2022-12-23
  • 2021-09-09
相关资源
相似解决方案