| |
browse.develop.com
Browse.develop.com is a community that was established to collect and
organize valuable web information. Our technical staff have selected and
indexed information and courses that they feel will help you stay
current on best practices across the SDLC.
|
2 Articles match "Handler","WPF"
| Related DevelopMentor Courses | MORE | | Essential Windows Presentation Foundation - WPF Training Use new technologies such as LINQ and XLINQ with WPF. Utilize your existing controls, forms and resources from Windows Forms with WPF. Come and get familiar with the dynamic and creative application development that WPF enables. Learn how to best utilize WPF for both new projects as well as porting existing Windows Forms, MFC or traditional Win32 application over to this new platform. You'll get answers to these questions: What are the main building blocks of a WPF application and how do I use them? What are the new features in WPF 3.5 to WPF 4.0 DevelopMentor Courses - Wednesday, February 22, 2012 Essential Windows Presentation Foundation - WPF Training Use new technologies such as LINQ and XLINQ with WPF. Utilize your existing controls, forms and resources from Windows Forms with WPF. Come and get familiar with the dynamic and creative application development that WPF enables. Learn how to best utilize WPF for both new projects as well as porting existing Windows Forms, MFC or traditional Win32 application over to this new platform. You'll get answers to these questions: What are the main building blocks of a WPF application and how do I use them? What are the new features in WPF 3.5 to WPF 4.0 DevelopMentor Courses - Tuesday, March 1, 2011 |
23 Articles match "Handler","WPF"
| The Latest from DevelopMentor | MORE | | Validation with Simple MVVM Toolkit INotifyDataErrorInfo is supported by Silverlight 4, but it is not supported by WPF and will only have limited support in Windows Phone 7.1. < Button Content ="OK" Click ="OKButton_Click" IsEnabled ="{ Binding Path =IsValid, Mode =TwoWay}"/> This example uses a handler in the View code-behind, but more likely you would use either an event trigger (with the Blend SDK installed) or a command with a CanExecute method. In version 2.1 of Simple MVVM Toolkit I added support for validation with INotifyDataErrorInfo. Performing validation with INotifyDataErrorInfo is very powerful. Tony and Zuzana's World - Sunday, July 10, 2011 Using the Message Mediator Service in MVVM Helpers actually work in all kinds of fields and technologies, but WPF has a special place in my heart – and it turns out this service is pretty useful for GUI applications to enable loose-coupling between elements, particularly when you are relying on other design patterns such as Model-View-ViewModel (MVVM). 5: /// registered as target method handlers for the given message key. 17: /// This registers a specific method as a message handler for a specific type. 20: /// Handler method. 21: void RegisterHandler ( string key, Action handler); 22: 23: ///. 3: ///. 6: ///. Mark's Blog of Random Thoughts - Tuesday, February 22, 2011 Easier Async for Silverlight Apps using MVVM However, as is the case with other UI frameworks such as Windows Forms or WPF, you should not touch UI elements from worker threads. WPF and Silverlight have Dispatcher.CheckAccess / Dispatcher.BeginInvoke. And the BackgroundWorker component lets you write events handlers that are executed on the UI thread when reporting progress or completion. protected void Notify ( EventHandler < NotificationEventArgs > handler, NotificationEventArgs e) { if (handler != Windows Forms has the Control.InvokeRequired / Control.BeginInvoke API. Tony and Zuzana's World - Saturday, January 29, 2011 | -
| The Best from DevelopMentor | MORE | - Part 3: Shifting focus to the first available element in WPF
We've seen how to programatically control focus and that's all great stuff, but one thing I like to do with WPF is see how much of the repetitive or UI-specific code I can move into the XAML and keep out of the code behind. This event is raised each time the TabControl shifts to a new tab - so if we never unhook our handler, our focus management code is called each time the tab page becomes visible. Tags: NET;WPF We can use the FocusManager.FocusedElement property to shift focus in XAML but it only works when the element exists in the main XAML file. but all is not lost! - Rehosting the Workflow Designer in WF4
Both these properties point to ready to use WPF UIElement’s so, as long as the host used WPF, adding them to a form is easy. The toolbox on the left if another standard WPF control called the ToolboxControl. Again easy to add to any WPF form. We could periodically check this Selection but its even easier to subscribe to chances using the Subscribe() function and passing in a handler that is called whenever the selection changes. workflowDesigner.Context.Items.Subscribe (SelectionChanged); The handler itself isn’t very complex either. orderby type.Name. The Problem Solver - Wednesday, December 23, 2009 - Using Model – View – ViewModel with Silverlight
have found it extremely easy to use when developing very different applications and have used the design pattern recently in both ASP.NET, WPF and Silverlight applications. Josh Smith did an excellent screen cast for Pixel8 on using MVVM with WPF, you can find it here. If you need an event handler in your code behind, like the button click, make it a single line and pass the request onto the ViewModel. Tags: NET DevCenter WPF Silverlight The View – Model – ViewModel design pattern, also known as MVVM, is getting more popular these days. 11: {. 13: set. 14: {. 19: }. The Problem Solver - Tuesday, April 7, 2009 - Part 3: Shifting focus to the first available element in WPF
We've seen how to programatically control focus and that's all great stuff, but one thing I like to do with WPF is see how much of the repetitive or UI-specific code I can move into the XAML and keep out of the code behind. This event is raised each time the TabControl shifts to a new tab - so if we never unhook our handler, our focus management code is called each time the tab page becomes visible. Tags: NET WPF We can use the FocusManager.FocusedElement property to shift focus in XAML but it only works when the element exists in the main XAML file. but all is not lost! - MVVM: Views and ViewModels
Views are the UI presentation of data - in the case of a WPF/Silverlight application this is most commonly the XAML and XAML code behind files (they are considered a single element together). This extension is responsible for creating an associated ViewModel for this view (where our testable business logic should go) and also wiring up a couple of special event handlers that will allow the ViewModel to activate the view and close the view respectively. That way, my ViewModel sticks with base (non-WPF) types. This is necessary under WPF 3.5 Project Template. Views. - Easier Async for Silverlight Apps using MVVM
However, as is the case with other UI frameworks such as Windows Forms or WPF, you should not touch UI elements from worker threads. WPF and Silverlight have Dispatcher.CheckAccess / Dispatcher.BeginInvoke. And the BackgroundWorker component lets you write events handlers that are executed on the UI thread when reporting progress or completion. protected void Notify ( EventHandler < NotificationEventArgs > handler, NotificationEventArgs e) { if (handler != Windows Forms has the Control.InvokeRequired / Control.BeginInvoke API. Tony and Zuzana's World - Saturday, January 29, 2011 - NativeActivity – A Tricky Beast
But, because we want to retry on failure, we also pass in a fault handler (OnFaulted). Next it schedules the Delay as we have to wait for the retry delay and wires up a completion handler (OnDelayComplete) so we know when the delay is finished. OnDelayComplete simply reschedules the Body activity, remembering to pass the fault handler again in case the activity fails again. have written a designer to go with this (designers in WF4 are WPF based). I’m writing Essential Windows Workflow Foundation 4.0 with Maurice for DevelopMentor. AsyncCodeActivity. NativeActivity. .NET Meanderings - Tuesday, February 9, 2010 %>
| | |