lostfocus

control lost focus event when using keyboard shortcut

For both .NET Winforms and Windows Presentation Foundation, if I have a text box that the user has just entered text into, and a button, if the user clicks the button the "LostFocus" event fires before the button click event fires. However if the user uses a keyboard shortcut for the button (e.g. Button's text is "&Button" or "_Button" ...

Intercept Silverlight DatePicker's convert from text to DateTime

Hi, I want DatePicker to convert the following text pieces to DateTime (shown in international format) so my customers can write a date in DatePickers textbox faster so it is not just DateTime.Parse I will use: "3" to 2009-10-03 "14" to 2009-10-14 "1403" to 2009-03-14 "140310" to 2010-03-14 "14032010" to 2010-03-14 I have tried diffe...

LostFocus Binding doesn't work on template

I have a TabControl that is data bound to a list. (Two data items in the list) The TabControl has a DataTemplate which contains two TextBox controls bound to two string properties on my data class. If I type some text on Textbox1 on the first tab and then click onto Tab2, no update is made to the data source and the change is lost. Thi...

ASP.NET :: Can a textbox control's onblur/lostFocus event trigger a server-side event?

I am trying to attach a server-side event to lookup the city/state for the user-entered zipcode in a field like the one below. <asp:TextBox ID="TextZipcode" runat="server" CssClass="inputtext" Columns="10" MaxLength="10"></asp:TextBox> Since there is no lost focus event to capture, has anyone had any luck getting this to work? ...

WPF TextBox lostfocus as attached property

I have a Grid with many TextBoxes and I want to call NotifyPropertyChanged() method to update some other controls everytime one of these TextBox-es changed the value = lost the focus (I don't want to use PropertyChanged as UpdateSourceTrigger) This is what I can do: <Grid TextBoxBase.TextChanged="My_TextChanged" > ... </Grid> I ne...

losing focus from listboxitem in silverlight

So heres the situation, i have a listbox that has a itemcontainerstyle with a template that contains a usercontrol. Inside this usercontrol is: <Grid Name="Label" MouseLeftButtonDown="Label_MouseLeftButtonDown" > <TextBlock Name="Text" /> </Grid> </Border> <Grid Name="Editor" Visibility="Collapsed" > ...