background preloader

Silverlight & WPF

Facebook Twitter

MSDN Archive - File Downloads. Different license terms apply to different file types: - Source code files are governed by the MICROSOFT PUBLIC LICENSE (Ms-PL) (INCLUDED BELOW).- Binary files are governed by MSDN CODE GALLERY BINARY LICENSE (INCLUDED BELOW). - Documentation files are governed by CREATIVE COMMONS ATTRIBUTION 3.0 LICENSE (INCLUDED BELOW).

MSDN Archive - File Downloads

MICROSOFT PUBLIC LICENSE (Ms-PL) This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 1. MSDN Archive - File Downloads. Different license terms apply to different file types: - Source code files are governed by the MICROSOFT PUBLIC LICENSE (Ms-PL) (INCLUDED BELOW).- Binary files are governed by MSDN CODE GALLERY BINARY LICENSE (INCLUDED BELOW). - Documentation files are governed by CREATIVE COMMONS ATTRIBUTION 3.0 LICENSE (INCLUDED BELOW).

MSDN Archive - File Downloads

MICROSOFT PUBLIC LICENSE (Ms-PL) This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 1. The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. MSDN Archive - File Downloads. Different license terms apply to different file types: - Source code files are governed by the MICROSOFT PUBLIC LICENSE (Ms-PL) (INCLUDED BELOW).- Binary files are governed by MSDN CODE GALLERY BINARY LICENSE (INCLUDED BELOW). - Documentation files are governed by CREATIVE COMMONS ATTRIBUTION 3.0 LICENSE (INCLUDED BELOW).

MSDN Archive - File Downloads

MICROSOFT PUBLIC LICENSE (Ms-PL) This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 1. Samples. French, German, Italian, Japanese, Korean, Russian, Simplified Chinese, Spanish, Traditional Chinese Welcome to the Windows Presentation Foundation (WPF) documentation samples site.

Samples

This site has samples that complement the WPF documentation on MSDN. These samples target Visual Studio 2010 and are organized in the following categories. All Samples All SamplesThis download contains all of the WPF documentation samples in a single package.Download Getting Started with WPF Introduction to Building WPF ApplicationsThis sample provides an introduction to the development of a simple WPF application, and demonstrates controls, images, layout, and data binding.Download | Getting Started with WPF WPF Controls Gallery SampleThis sample shows common usage scenarios and the default rendering behavior for many user interfaces and layout controls in WPF.Download | System.Windows.Controls Namespace.

How to build an outlook style application – part 1 - Erwin van der Valk's blog: Practicing patterns. [Update] This is part 1 of this post.

how to build an outlook style application – part 1 - Erwin van der Valk's blog: Practicing patterns

Read the second post here. At the end of building prism V2, we have played around with different application styles to see how easy it is to consume our own libraries. In this blog post, I’m going to describe my attempt at creating an outlook style application. My implementation shows the following aspects: How to create application parts that can be activated and deactivated, can be put in a list, and are very lightweight. How to build an outlook style application with prism v2 – Part 2 - Erwin van der Valk's blog: Practicing patterns.

A while ago, I put an example application on my blog on how to build an outlook style application.

how to build an outlook style application with prism v2 – Part 2 - Erwin van der Valk's blog: Practicing patterns

The last couple of weeks, I’ve been working on a new version of this app. I’ve done some bugfixes, but also included support for opening use cases in a popup window. It’s turning out to be quite an advanced demo of what’s possible with Prism. But while I’m playing with it, I can’t help but be amazed with the things I can push Prism into doing :) You will need the following references to make the solution work: So there are a couple of things I didn’t explain in my previous blog: Vista look on Non-Aero themes. I've tested this, but the results is not here, I work with .NET 3 RTM, VS 2005 Team Suite and extension for WPF/WCF on Windows XP Pro SP2, I've test this piece of code : "<Window x:Class="avirer.Window1" xmlns=" xmlns:x=" Title="WPFTestThemes" Height="300" Width="300"> and the look of vista is not here :( here is a screenshot :

Vista look on Non-Aero themes

JCQ. Controls. This topic contains the following sections.

Controls

You can add a control to an application by using either Extensible Application Markup Language (XAML) or code. The following example shows how to create a simple application that asks a user for their first and last name. This example creates six controls: two labels, two text boxes, and two buttons, in XAML. All controls can be created similarly. WPF Controls. Single Download. Visual Studio Extensions for WPF. RadControls for WPF - XBAP. TV > Watch > Introduction to Prism with the RadControls for WPF. Subscribe Subscribe to all Introduction to Prism with the RadControls for WPF Published on Jan 28, 2010 In this webinar, you'll be introduced to Microsoft's Composite Application Guidance, better known as Prism.

TV > Watch > Introduction to Prism with the RadControls for WPF

Commanding Overview. Commands have several purposes.

Commanding Overview

The first purpose is to separate the semantics and the object that invokes a command from the logic that executes the command. This allows for multiple and disparate sources to invoke the same command logic, and it allows the command logic to be customized for different targets. For example, the editing operations Copy, Cut, and Paste, which are found in many applications, can be invoked by using different user actions if they are implemented by using commands. An application might allow a user to cut selected objects or text by either clicking a button, choosing an item in a menu, or using a key combination, such as CTRL+X.

By using commands, you can bind each type of user action to the same logic. The routed command model in WPF can be broken up into four main concepts: the command, the command source, the command target, and the command binding: —Executing Commands with Input Gestures. Using the Help command in such a simple dialog may seem like overkill when a simple event handler for Click would do, but the command has provided an extra benefit (other than localized text): automatic binding to a keyboard shortcut. Applications typically invoke their version of help when the user presses the F1 key. Sure enough, if you press F1 while displaying the dialog defined in Listing 3.10, the Help command is automatically launched, as if you clicked the Help Button! That's because commands such as Help define a default input gesture that executes the command.

You can bind your own input gestures to a command by adding KeyBinding and/or MouseBinding objects to the relevant element's InputBindings collection. For example, to assign F2 as a keyboard shortcut that executes Help, you could add the following statement to AboutDialog's constructor: this.InputBindings.Add( new KeyBinding(ApplicationCommands.Help, new KeyGesture(Key.F2))); Download WPF Commanding Sample. Different license terms apply to different file types: - Source code files are governed by the MICROSOFT PUBLIC LICENSE (Ms-PL) (INCLUDED BELOW).- Binary files are governed by MSDN CODE GALLERY BINARY LICENSE (INCLUDED BELOW). - Documentation files are governed by CREATIVE COMMONS ATTRIBUTION 3.0 LICENSE (INCLUDED BELOW).

MICROSOFT PUBLIC LICENSE (Ms-PL) This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 1. The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. A "contribution" is the original software, or any additions or changes to the software. WPF and Property Dependencies. Download demo project - 13.93 KB Introduction One of the most difficult aspects in creating applications from user requirements is the process of capturing the information that pertains to control behaviors. Situations where controls have many dependencies on both data and the state of other controls often lead to spaghetti code. In this article, I am going to look at some of the ways of capturing these requirements and turning them into manageable chunks of XAML and C#.

A Look at Data Binding For a control to have its data saved somewhere, we can use a variety of methods. Receive notifications for dependency prope. Receiving notifications for dependency property changes on an existing object is a very common scenario. The way to do it properly is not very obvious. So much so that while reviewing some code, I found the following snippet. // Believe it or not, this seems to be the only way to get change// notifications for DPs unless you derive from the relevant// class and override OnPropertyChanged. PropertyDescriptor prop = TypeDescriptor.GetProperties(obj)["Prop"]; prop.AddValueChanged(obj, delegate { viewModel.RaisePropertyChanged("Prop"); }); Registering to a DependencyProperty's Change Event. Windows Presentation Foundation. WPF Fundamentals.

Input and Commands. WPF Architecture. WPF displays data by traversing the unmanaged data structures managed by the milcore. These structures, called composition nodes, represent a hierarchical display tree with rendering instructions at each node. This tree, illustrated on the right hand side of the figure below, is only accessible through a messaging protocol. There is a very important architectural detail to notice here – the entire tree of visuals and drawing instructions is cached. In graphics terms, WPF uses a retained rendering system. This enables the system to repaint at high refresh rates without the composition system blocking on callbacks to user code. Another important detail that isn’t really noticeable in the diagram is how the system actually performs composition. In User32 and GDI, the system works on an immediate mode clipping system. Events (WPF) Routed Events And Commands In WPF. Optimizing Performance. How to get access to WPF’s internal. Creating 3D Models for WPF.

I’ve had an opportunity recently to play around with WPF’s 3D capabilities to try and recreate part of the Tesco product viewer demo at PDC08. Of course one of the first hurdles is actually having some sort of 3D model to play with (once you get bored with a cube). There are lots of sites where you can download 3D models in various formats (many of them chargeable) but I wanted to understand a little about the tools and techniques so I decided to build a few simple 3D models myself.

I plumped for Blender as my 3D tool primarily because it’s powerful and it’s free. As I don’t do much 3D design work I can’t really justify spending a lot of money on a tool. I only scraped the surface of Blender’s capabilities in my journey but it was a lot of fun. WPF XAML (psd/png 2 xaml) Series on GPU-based Effects for WPF.

Data Binding in WPF. Data Points. WPF Forms over Data Videos. XAML in WPF. Use XamlReader.Load for WPF XAML. WPF Dialogs and DialogResult. How does the WPF Button.IsCancel property work? WPF Magazine (MSDN) WPF in Visual Studio 2010 - Part 1. This is the first part in a seven part series. Links to the other parts are included at the bottom of this post. Now that the Release Candidate for Visual Studio 2010 is publicly available, we’ve started receiving questions from inquisitive users about how Visual Studio 2010 itself was built. Lester's WPF blog. Synchronizing the width of elements in an ItemsControl « Josh Sm.

When I use an ItemsControl (or subclass of ItemsControl, such as ListBox) to display a list of items, I often want the width of an element in each item to match the width of the equivalent elements displayed for all other items. That is easy to achieve by setting the Width property of an element in the DataTemplate used by the ItemTemplate property, but using hard-coded width and height values is generally considered to be a bad practice. It’s better to not specify a width, and let the element figure out how big it should be based on its content. But, if the element created for each item in the ItemsControl is sizing to its own content, that means that the sizes of all elements created for items will usually not be equal to each other. For example, the screenshot below displays an ItemsControl populated with some strings.

Silverlight rendered in WPF. A hobby project I have been working on, to clear my mind of the daily grind, is a Control that lets a developer host a Silverlight application to WPF. A good kept secret is there is complete COM API for hosting Silverlight outside the browser. There is even sample C++ code here . WPF SilverlightViewport.