You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
downkyi/DownKyi/Views/ViewVideoDetail.xaml.cs

34 lines
951 B

using System.Diagnostics;
using System.Windows.Controls;
using System.Windows.Input;
namespace DownKyi.Views
{
/// <summary>
/// Interaction logic for ViewVideoDetail
/// </summary>
public partial class ViewVideoDetail : UserControl
{
public ViewVideoDetail()
{
InitializeComponent();
}
/// <summary>
/// 由于预览事件tunneling这将阻止rightmousebuttondown在listviewitems上发生从而阻止它们被选中
/// 但不会阻止rightmousebuttondown在listview上出现因此仍然允许contextmenu打开。
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnListViewItemPreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
#if DEBUG
Trace.WriteLine("Preview MouseRightButtonDown");
#endif
e.Handled = true;
}
}
}