输入事件

编程入门 行业动态 更新时间:2024-10-25 19:21:28
本文介绍了输入事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试运行代码以在用户切换或单击字段时打开模式屏幕.

I'm trying to run code to open a modal screen when the user tabs or clicks into a field.

在使用begininvoke和 INotifyPropertyChanged.p ropertyChanged

I have similar even cose working when a field value is changed usign the begininvoke and INotifyPropertyChanged.propertyChanged

代码,因此需要类似的代码来输入"而不是更改"

code, so needsimilar code for "enter" rather than "change"

这是我的更改代码:

Private Sub UserParameters_SelectionChanged() ' catches the field that has the focus on the screen Dim selectedItem = Me.UserParameters.SelectedItem If (selectedItem Is Nothing) Then Return Microsoft.LightSwitch.Threading.Dispatchers.Main.BeginInvoke _ ( Sub() RemoveHandler DirectCast(selectedItem, INotifyPropertyChanged).PropertyChanged _ , AddressOf PropertyChanged AddHandler DirectCast(selectedItem, INotifyPropertyChanged).PropertyChanged _ , AddressOf PropertyChanged End Sub ) End Sub Private Sub PropertyChanged(ByVal sender As Object, ByVal e As PropertyChangedEventArgs) 'ShowMessageBox("param 7 from within change = " & clsCommonfunctions.fncParamDate(7, "-All-", "err")) Select Case e.PropertyName Case "CurrentUserValue" If Me.UserParameters.SelectedItem.CurrentUserValue = "" Then entityWindow.AddEntity() Else entityWindow.ViewEntity() End If End Select End Sub

谢谢

赠予

推荐答案

我只能说这是一个非常"坏"的问题;想法是当有人进入或单击控件时弹出模式窗口.这将非常"震撼".用户的体验. All I can say is that it's a very "bad" idea to be popping up modal windows when someone enters, or clicks into, a control. It would be very "jarring" experience for the users.

更多推荐

输入事件

本文发布于:2023-08-01 18:40:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1270698.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:事件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!