event-handling

Why is there no IsReadOnlyChanged event on TextBox controls?

喜你入骨 提交于 2019-12-07 22:52:28
I was adding some workaround code to fix the bug outlined in Is this a bug in DotNet 4 WPF Spell Checking? , (When a WPF TextBox changes Enabled, Visible or ReadOnly states, any SpellCheck custom dictionaries get dropped off until you disable and re-enable SpellCheck) and the simplest fix seemed to be to handle the IsVisibleChanged , IsEnabledChanged , and IsReadOnlyChanged events. Simple, right? Except there is no IsReadOnlyChanged event. Anybody know why and what the best way to trap a change to IsReadOnly in a WPF TextBox would be? Arsen Mkrtchyan You can always follow dependency property

ASP.NET Textbox TextChanged and Button OnClick event interaction?

六月ゝ 毕业季﹏ 提交于 2019-12-07 22:46:53
问题 I've got an ASP.NET application that I'm accessing through Google Chrome. On a particular page I've got an asp:TextBox with a OnTextChanged event that recalculates a few other fields on the page. I've also got an asp:LinkButton with an OnClick event that saves the changes to the database. I was facing a problem where the user left the TextBox by clicking on the save button. The button was firing before the TextChanged event so the changes were not being captured in the save. I fixed this by

Catch all changes made to Work Items in TFS 2012 Event Subscriptions

南楼画角 提交于 2019-12-07 22:14:27
问题 What I'm after is a way to catch all changes made to certain fields in the Work Items stored on our new TFS 2012 server, so that I can do other logic (processing the updates via a Help Desk API) with the results based on what is changed by the developers. I've been struggling for over a week now, Googling and reading reference materials, but nothing works with TFS 2012 it seems. I've tried the setup from: Developing and debugging Server Side Event Handlers in TFS 2010 (GeeksWithBlogs) And

Replaying a video continuously in a WPF media element

青春壹個敷衍的年華 提交于 2019-12-07 21:03:05
问题 I have a video file playing in a media element. I need to keep it playing, thus I tried: me.play(); me.MediaEnded += new RoutedEventHandler(me_MediaEnded); With this event method: //loop to keep video playing continuously void me_MediaEnded(object sender, EventArgs e) { //play video again me.Play(); } However the above does not replay the video file. Why? What did I do wrong? 回答1: According to a post on MSDN: Play() starts from the current position therefore you have to first go to the

Basic WinForm KeyDown event handling

我只是一个虾纸丫 提交于 2019-12-07 20:18:23
问题 I'm using WinForms. I've created an event handler for the KeyDown event of the main form, thereby invoking a button's Click event handler. The Click event handler called is dependent upon the specific key pressed. If a user clicks the button rather than using the key, and then subsequently tries to use the key thereafter, the key (down arrow for example) acts as a tab-cycle, changing focus between each button control on the form (rather than executing the Keydown handler). Any ideas ? 回答1:

Occasionally connected CQRS systems - Client and Server Commands - Task based screens

杀马特。学长 韩版系。学妹 提交于 2019-12-07 20:01:33
问题 Premise: It is recommended that in CQRS+DDD+ES style applications use task based screens, these screens guide the user and capture intent. These task screens can also be referred to as Inductive User Interface . Some examples of UI design guidelines that can help you create mondern, user-friendly apps: Microsoft Inductive User Interface Guidelines and, Index of UX guidelines The way I understand it, the tasks , generally speaking, should line up with Commands or Functions waiting on the

Webbrowser: sequencing activites when no DocumentCompleted is fired by a link on hosted webpage

半腔热情 提交于 2019-12-07 18:56:52
问题 Given this method to work on a HTML page in a webbrowser: bool semaphoreForDocCompletedEvent; private void button12_Click(object sender, EventArgs e) { checkBox1.Checked = false; //unchecked if the NAvigating event is fired and Checked after DocumentCompleted is fired, only to have a visual reference on the Form HtmlDocument doc = Program.wb.Document; HtmlElement ele = doc.GetElementById("menuTable"); foreach (HtmlElement sub in ele.All) { if (sub.GetAttribute("href").Contains("something")) {

Binding events to buttons in an ItemsControl

不打扰是莪最后的温柔 提交于 2019-12-07 18:14:33
问题 I have a windows phone 7 app with some xaml that looks like: <Grid x:Name="ContentGrid" Grid.Row="1"> <ItemsControl x:Name="MyView" ItemTemplate="{StaticResource MyInner}"/> </Grid> The item template here looks like: <DataTemplate x:Key="MyInner"> <ItemsControl ItemsSource="{Binding}" ItemTemplate="{StaticResource MyInner_Item}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal"/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </DataTemplate

How to use removeEventListener when event handler is a prototype function?

蓝咒 提交于 2019-12-07 17:53:46
问题 This is a follow-up to this question. The problem is that my call to removeEventListener does not work. What do I have to change below so that it does work? My custom object: //Custom Editor Example with event listeners var CE = function (id) { 'use strict'; // assume not a valid object this.isValid = false; this.element = document.getElementById(id); if (this.element !== null) { this.id = id; this.init(); this.isValid = true; } }; CE.prototype.addEvent = function (event, callback, caller) {

Event handling for geometries in Three.js?

柔情痞子 提交于 2019-12-07 17:47:29
问题 I am looking for some kind of event handling for geometries/cameras/lights(things we add to scene) in three.js ? I googled but couldn't find anything relevant. I did a simple Sphere rendering and tried to see the DIV contents in firebug, but there's just one canvas, and adding any "onclick" to the canvas makes the event for all the canvas, that is, its not just for the sphere or light. Any suggestions ? 回答1: You need to a couple o things to get interactivity in 3D: get a vector for the mouse