| 123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Input;
- using System.Windows.Media;
- namespace Muchinfo.MTPClient.Account.Views
- {
- /// <summary>
- /// MessageView.xaml 的交互逻辑
- /// </summary>
- public partial class MessageView : UserControl
- {
- public MessageView()
- {
- InitializeComponent();
- this.dg_Message.MouseDoubleClick += dg_Message_MouseDoubleClick;
- }
- private void dg_Message_MouseDoubleClick(object sender, MouseButtonEventArgs e)
- {
- var obj = e.OriginalSource as DependencyObject;
- while (obj != null && !(obj is System.Windows.Controls.Primitives.DataGridColumnHeader))
- {
- obj = VisualTreeHelper.GetParent(obj);
- }
- if (obj != null)
- {
- e.Handled = true;
- }
- }
- private void Title_OnKeyUp(object sender, KeyEventArgs e)
- {
- //使用KeyUp,阻止键盘精灵弹出
- e.Handled = true;
- }
- }
- }
|