|
|
Browse by Tags
All Tags » Sample » WPF (RSS)
-
It can be pretty hard to keep everything up-to-date on a developer workstation these days. With so many CTP releases, betas, and service packs, I know I often realize that my own machine is behind in one area or another. One particularly worthwhile update that might have missed your attention over the last couple of weeks is a new release of the Windows SDK , focused on enhancements in the .NET Framework 3.5, Windows Vista SP1 and Windows Server 2008. Amongst other changes, this updated SDK has new documentation that covers all the new classes in WPF 3.5 (e.g. UIElement3D, System.AddIn, LINQ-based data binding), a variety of new samples for common Windows services such as User Account Control, Windows Search, Windows Error Reporting, Speech, and a range of shell APIs. If you've not installed the Windows SDK before, another incentive is a ZIP file containing over 100MB of sample WPF code (check out %ProgramFiles%\Microsoft SDKs\Windows\v6.1\Samples\WPFSamples.zip). After installing Read More...
|
-
Many of you have seen the New York Times reader application - it was featured as part of the portfolio I've been building up of Great WPF Applications . As I mentioned at the time, the New York Times reader is based on an SDK that we built to allow newspapers and content publishers to create rich, "occasionally-connected" experiences based on the flow layout capabilities in WPF. We've had a private beta program running for a while now, and over the intervening months there have been a number of other newspapers that have gone live with applications using this toolkit. Now we're delighted to announce the public release of the reader toolkit on windowsclient.net . We've made a number of improvements to the kit to broaden its usage; the reader toolkit is now known by the rather more accurate but slightly less memorable name: the Syndicated Client Experiences Starter Kit . This reflects its potential to go beyond a news reading scenario and handle other kinds of data synchronization Read More...
|
-
A new WPF 3.5 feature in the Annotations area is the capability to match annotations with the corresponding annotated objects. For example, you can now implement a document viewing application that has a comments pane, where the paragraph that contains the corresponding comment (a text sticky note in this case) is brought into view if you make a selection. A simplified version of such an application may look like this: The list box is bound to the list of annotations. In particular, it uses a converter (IValueConverter) to turn the content of each annotation (64-bit binary data) into text strings. The following is the implementation of the converter: public class AnnotationDataConverter : IValueConverter { public object Convert( object value, Type targetType, object parameter, CultureInfo culture) { // Convert 64 bit binary data into an 8 bit byte array and load // it into a memory buffer byte [] data = System. Convert .FromBase64String(value as string ); using ( MemoryStream buffer = new Read More...
|
-
Three months ago, we launched Family.Show, our first end-to-end reference sample for WPF. Family.Show is a genealogy program that demonstrates the usage of WPF for a complex, realistic scenario. If you're a fledgling WPF developer who wants to pore over some code that demonstrates best practices for application construction, there's nothing better out there today. In the intervening months, we've had many thousands of downloads of both the binary and the source code. We've had several offers to localize the application into languages ranging from Spanish to Russian, many people have sent in feature requests, and we've had some great feedback about the application itself. Here's a few examples: "This is incredible application. So nice and powerful. That is exactly what I am searching for in applications: Simplicity, Power and Beauty... You cannot imagine how many people was impressed by it, including myself." "This is just a gorgeous program. The graphics are extremely scalable, the visuals Read More...
|
-
In WPF, you bind to objects returned by web service method calls the same way you bind to any other objects. To demonstrate, we’ll walk through a simple application that consumes the MSDN/TechNet Publishing System (MTPS) Content Service, discussed here . Our application implements a very simple scenario that retrieves the list of languages supported by a given document. Create a Reference to the Web Service The first step is to create a reference to the MTPS web service. To create a web reference using Visual Studio: Open your project in Visual Studio . From the Project menu, click Add Web Reference . In the dialog box, set the URL to the following: http://services.msdn.microsoft.com/contentservices/contentservice.asmx?wsdl Press Go , then Add Reference , to create the web reference. Call the Web Service and Set the DataContext We are now ready to call the GetContent web service method and bind to the returned object. All we need to do is call the web service and set the DataContext property Read More...
|
-
Great news! You can now download WPF samples individually. From the WPF samples page on MSDN , just go to the sample topic of your choice, click the “Download sample” link on the page, and follow the instructions! It’s fast and easy! Note that if you...( read more ) Read More...
|
-
I just created a sample that serves as a walkthrough wizard for teaching WPF animations. Besides teaching you the basics of WPF animations in an interactive and relatively entertaining way, there are a bunch of cool effects integrated into the wizard...( read more ) Read More...
|
-
I've recently picked up a great book called Flash Math Creativity . I been inspired by some of the techniques it outlines and have played around with similar ideas in WPF. The exercise has been a fruitful one, in that I'm making some pleasing computer art while also learning about the differences between Action Script animation and WPF animation. The first one I played with is flowers, inspired by the work of Glen Rhodes , which is actually featured on the cover of the book. You can see the results here and download the code here . The first flower, which has no animation, is pretty simple. I just create 125 rectangles with a fill using a DrawingBrush I created in Blend. I place each of the petals on the "stage", which in the case is a Grid . I use Grid instead of Canvas so that I get the goodness of the WPF layout engine for free without having to handle any positioning of the rectangles. I then tranform the rotation and scale of each one to create the flower effect. I also swap the ZIndex Read More...
|
|
|
|