| |
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.
|
67 Articles match "WPF"
See all articles with
"WPF"
| The Latest from Mark's Blog of Random Thoughts | MORE | | Unit Testing with services in MVVM Helpers The unit testing framework makes no guarantee of the Synchronization Context being present however – unlike WPF. NET Code MVVM WPFIn the previous post I showed how you can easily replace services within your application to fit whatever your goals are. This is also a requirement when you would like to unit test your application, but there’s a slightly different twist to it. As a simple example, let’s use the little demo app we built to play with service replacement. Are you sure you want to proceed?" , MessageButtons.YesNo); if (result == MessageResult.Yes). {. TestMethod()]. Mark's Blog of Random Thoughts - Wednesday, March 9, 2011 Replacing Services in MVVM Helpers ll start with a brand-new WPF application and add MVVMHelpers through NuGet – a new service from Microsoft for adding dependencies easily: Next, let’s add a single button and a TextBlock to the window, in two equally spaced rows – binding the first to a command called “CalculatePi” and the second to some text “PiText”. NET Code MVVM WPFOne of the key features in any good library is to provide a wide set of services for applications to use, but also some level of flexibility to replace those services when the built-in implementation aren’t what is needed. Happy Coding! Mark's Blog of Random Thoughts - Wednesday, March 9, 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). First, I am going to create a new WPF 4.0 One of the services exposed in the MVVM Helpers library is a Message Mediator. This service implements the mediator design pattern which is used to enable objects to talk to each other without having any explicit knowledge of each other. Mark's Blog of Random Thoughts - Tuesday, February 22, 2011 | | The Best from Mark's Blog of Random Thoughts | MORE | | WPF MVVM Helper Library (WPF + MVVM = testability) There's been a lot of talk about the Model-View-ViewModel pattern recently and it's usage around the WPF and Silverlight technology stack. When teaching WPF, I always introduce students to MVVM as part of the Essential WPF class, it's an incredibly useful pattern that really separates the UI from the code behind behavior. It's evolution owes a lot to various blog posts, WPF Disciples, and other WPF leaders; I certainly didn't invent anything radically new but borrowed heavily from all kinds of places as I built various classes I needed for my own work. file -. Mark's Blog of Random Thoughts - Friday, April 17, 2009 WPF Data Providers One of the nifty new features of the WPF platform is the pluggable data providers. Data binding in WPF is extremely powerful -- I am constantly amazed at how much procedural code you can dump in favor of markup with creative bindings. Tags: NET;Code;WPF It ships with two out of the box: ObjectDataProvider: allows you to execute binding expressions against an object and it's methods. XmlDataProvider: loads an XML data source and makes it available as a binding source. State, Age, Income. We can get the data loaded into a collection source through the XmlDataProvider. Mark's Blog of Random Thoughts - Wednesday, January 17, 2007 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. 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. If you use UserControls it turns out that the approach doesn't work because that element is loaded separately and not available when the initial focus is being determined. but all is not lost! Mark's Blog of Random Thoughts - Friday, September 12, 2008 | - 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). That way, my ViewModel sticks with base (non-WPF) types. This is necessary under WPF 3.5 Tags: NET Code MVVM WPF In the previous post, I provided a link to the project template you can use to start a new MVVM project using the JulMar MVVM library. Here's the two links in case you didn't get them before: MVVM Helpers Distribution. Project Template. Dependencies. ViewModels. - Part 2: Changing WPF focus in code
In the last post , I wrote about how focus is generally managed in WPF - we have focus scopes to track a single element within that scope for logical focus, and then one of those elements is given physical, or keyboard focus. First, there is a Keyboard class in WPF which exposes several methods and properties. However, the most common request is to set initial focus to a specific control - remember that WPF doesn't do that by default. However, a popular way to develop WPF applications is to separate out chunks of UI into separate UserControls. Tags: NET WPF Mark's Blog of Random Thoughts - Thursday, September 4, 2008 - Part 2: Changing WPF focus in code
In the last post , I wrote about how focus is generally managed in WPF - we have focus scopes to track a single element within that scope for logical focus, and then one of those elements is given physical, or keyboard focus. First, there is a Keyboard class in WPF which exposes several methods and properties. However, the most common request is to set initial focus to a specific control - remember that WPF doesn't do that by default. However, a popular way to develop WPF applications is to separate out chunks of UI into separate UserControls. Tags: NET;WPF Mark's Blog of Random Thoughts - Thursday, September 4, 2008 - 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. 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. If you use UserControls it turns out that the approach doesn't work because that element is loaded separately and not available when the initial focus is being determined. but all is not lost! - Adding to an ObservableCollection from a background thread
found a solution from Tamir Khason (a fellow WPF disciple), he wrote a thread-safe version ( [link] ), but I didn't want to add the locking into the collection itself (I want to manage it at a higher level myself). Tags: NET WPF One annoying thing about ObservableCollection is that it doesn't support modifications from background threads. ran into this problem a while back and searched out to see if someone else had solved it. Really, all I want is to do the notification on the proper (Dispatcher) thread. ObservableCollection. {. var eh = CollectionChanged; if (eh ! null ). {. - Replacing Services in MVVM Helpers
ll start with a brand-new WPF application and add MVVMHelpers through NuGet – a new service from Microsoft for adding dependencies easily: Next, let’s add a single button and a TextBlock to the window, in two equally spaced rows – binding the first to a command called “CalculatePi” and the second to some text “PiText”. NET Code MVVM WPFOne of the key features in any good library is to provide a wide set of services for applications to use, but also some level of flexibility to replace those services when the built-in implementation aren’t what is needed. Happy Coding! - 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). First, I am going to create a new WPF 4.0 One of the services exposed in the MVVM Helpers library is a Message Mediator. This service implements the mediator design pattern which is used to enable objects to talk to each other without having any explicit knowledge of each other. %>
132 Articles match "WPF"
See all articles with
"WPF"
| The Latest from DevelopMentor | MORE | | Join Me at Guerrilla.NET in November Model-View-ViewModel for WPF and Metro. Just a quick announcement for an developer upcoming event I’ll be participating in… Early November I’ll be co-teaching DevelopMentor’s biggest.NET developer event of the year in Los Angeles: Guerrilla.NET. If you haven’t been to Guerrilla.NET, it’s a very unique and memorable event – it’s unlike almost any other training class you’ve seen. We’ve just updated the outline with the most important current and upcoming technologies (see below). hope to see you there! mkennedy. Guerrilla.NET. Michael C. Kennedy's Weblog - Tuesday, September 25, 2012 What’s new in ApprovalTests.Net v.20? To test all the events on a form and its immediate children, simply call code as shown below: WinFormsApprovals.VerifyEventsFor( new DemoForm()); WPF support for Controls It’s always been possible to test WPF windows with a simple: WpfApprovals.Verify(window); This would render the window to a.png image and verify against.approved file. ASP routing support As community contributor, Krzysztof Ko?mic This can be particularly troublesome when changing an existing, unfamiliar piece of code. For example, it it easy to accidentally remove a button-click event. Happy testing. DevelopMentor Courses - Thursday, August 9, 2012 Simple MVVM Toolkit for Silverlight 5.0, Windows Phone 7.1 To get those, install the NuGet package manager from the Extensions Manager command under the Tools menu, then search for “SimpleMvvm” and select a package to install, depending on the type of project you have: WPF, Windows Phone, Silverlight 4 or Silverlight 5. I’ve just upgraded my Simple MVVM Toolki t to support Silverlight 5.0 and Windows Phone 7.1 ! You can download the latest version here and take it for a spin – or get it from the Visual Studio Extensions Gallery by opening Visual Studio and selecting Extensions Manager from the Tools menu. Enjoy DevelopMentor Courses - Friday, March 2, 2012 | -
| The Best from DevelopMentor | MORE | - WPF MVVM Helper Library (WPF + MVVM = testability)
There's been a lot of talk about the Model-View-ViewModel pattern recently and it's usage around the WPF and Silverlight technology stack. When teaching WPF, I always introduce students to MVVM as part of the Essential WPF class, it's an incredibly useful pattern that really separates the UI from the code behind behavior. It's evolution owes a lot to various blog posts, WPF Disciples, and other WPF leaders; I certainly didn't invent anything radically new but borrowed heavily from all kinds of places as I built various classes I needed for my own work. file -. - WPF Data Providers
One of the nifty new features of the WPF platform is the pluggable data providers. Data binding in WPF is extremely powerful -- I am constantly amazed at how much procedural code you can dump in favor of markup with creative bindings. Tags: NET;Code;WPF It ships with two out of the box: ObjectDataProvider: allows you to execute binding expressions against an object and it's methods. XmlDataProvider: loads an XML data source and makes it available as a binding source. State, Age, Income. We can get the data loaded into a collection source through the XmlDataProvider. Mark's Blog of Random Thoughts - Wednesday, January 17, 2007 - 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. 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. If you use UserControls it turns out that the approach doesn't work because that element is loaded separately and not available when the initial focus is being determined. but all is not lost! - Part 2: Changing WPF focus in code
In the last post , I wrote about how focus is generally managed in WPF - we have focus scopes to track a single element within that scope for logical focus, and then one of those elements is given physical, or keyboard focus. First, there is a Keyboard class in WPF which exposes several methods and properties. However, the most common request is to set initial focus to a specific control - remember that WPF doesn't do that by default. However, a popular way to develop WPF applications is to separate out chunks of UI into separate UserControls. Tags: NET WPF Mark's Blog of Random Thoughts - Thursday, September 4, 2008 - Part 2: Changing WPF focus in code
In the last post , I wrote about how focus is generally managed in WPF - we have focus scopes to track a single element within that scope for logical focus, and then one of those elements is given physical, or keyboard focus. First, there is a Keyboard class in WPF which exposes several methods and properties. However, the most common request is to set initial focus to a specific control - remember that WPF doesn't do that by default. However, a popular way to develop WPF applications is to separate out chunks of UI into separate UserControls. Tags: NET;WPF Mark's Blog of Random Thoughts - Thursday, September 4, 2008 %>
| | |