출처
http://code.msdn.microsoft.com/wpfsamples#themes
All Samples
This download contains all of the WPF documentation samples in a single package.
Download
Getting Started with WPF
Introduction to Building WPF Applications This 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 Sample This sample shows common usage scenarios and the default rendering behavior for many user interfaces and layout controls in WPF.
Download |
System.Windows.Controls Namespace Application Samples
Video Viewer Demo This sample creates a video viewing application that demonstrates styling, data binding, and data templating features.
Download |
Styling and Templating Data Binding Demo This sample creates a product listing application that allows users to enter items for sale. This sample demonstrates several data binding concepts.
Download |
Data Binding Overview Particle Effects Demo This sample application demonstrates how to produce particle effects within a System.Windows.Controls.Viewport3D.
Download |
Viewport3D Class XBAP Hosting Silverlight Sample This sample demonstrates how to host a Silverlight-based application in a XAML browser application (XBAP) and how to communicate between the host XBAP and the hosted Silverlight-based application.
Download |
WPF XAML Browser Applications Overview WPF Windows Samples
MessageBox Sample This sample demonstrates how to display a message box and get the message box return value.
Download |
Dialog Boxes Overview Dialog Box Sample This sample demonstrates how to use message boxes and common dialog boxes. This sample also shows how to create and use both modal and modeless dialog boxes.
Download |
Dialog Boxes Overview Notification Icon Sample This sample demonstrates how to display an icon in the notification area.
Download |
NotifyIcon Class WPF Fundamentals
Height Properties Sample This sample shows the differences among the height-related properties in WPF.
Download |
How to: Set the Height Properties of an Element Width Properties Comparison Sample This sample shows the differences among the width-related properties in WPF.
Download |
How to: Set the Width Properties of an Element Input and Commands
Create a Custom RoutedCommand Sample This sample shows how to create and use a custom System.Windows.Input.RoutedCommand.
Download |
Commanding Overview Styles
Introduction to Styling and Templating Sample This is a simple photo application that is designed to demonstrate how to use styling to create a visually compelling user experience.
Download |
Styling and Templating Themes
Default WPF Themes The theme files in this section are created from the resource dictionaries containing each WPF theme and are provided as examples of how to create themes, as well as how to customize existing controls.
Download |
System.Windows.Controls Namespace Threading
Single-Threaded Application with Long-Running Calculation Sample This sample demonstrates how to keep the UI from becoming non-responsive in single threaded application which performs a long operation.
Download |
System.Windows.Threading Namespace Controls
ListView with Multiple Views Sample This sample shows how to create a System.Windows.Controls.ListView control that displays data in multiple view modes, which include the System.Windows.Controls.GridView and other custom view modes.
Download |
ListView Overview TreeListView Sample This sample shows how to create a custom TreeView that resembles the ListView when it uses the GridView.
Download |
TreeView Class Popup Placement Sample This sample creates a simple System.Windows.Controls.Primitives.Popup and lets the user position the System.Windows.Controls.Primitives.Popup.
Download |
Popup Placement Behavior Control Customization
Styling with ControlTemplates Sample This sample shows the System.Windows.Controls.ControlTemplate examples for the most common WPF controls. If you are replacing the System.Windows.Controls.ControlTemplate of a control, these examples are the best place to get started.
Download |
Styling and Templating NumericUpDown Custom Control with Theme and UI Automation Support Sample This sample demonstrates how to create a custom control that supports theming and UI automation.
Download |
Control Authoring Overview ColorPicker Custom Control Sample This sample shows how to create a custom control and display it in a dialog window. This sample defines a custom color picker control that enables users to browse colors by their hue, saturation, and brightness.
Download |
Dialog Boxes Overview ResizingAdorner Sample This sample implements a simple adorner that adds resizing handles to the element to which it is applied.
Download |
Adorner Class Custom Radial Panel Sample This sample shows how to derive a custom layout object from System.Windows.Controls.Panel that arranges its child elements in a radial pattern.
Download |
Layout System Create a Custom Content-Wrapping Panel Sample This sample shows how to override the default layout behavior of the System.Windows.Controls.Panel element.
Download |
How to: Create a Custom Panel Element Layout
WPF Layout Gallery Sample This sample provides a set of overview documents and samples that visually introduce you to the layout system in WPF.
Download |
Layout System Data Binding
Binding Validation Sample This sample shows how to implement data validation on the UI layer using binding.
Download |
How to: Implement Binding Validation Introduction to Data Templating Sample This sample demonstrates how to use System.Windows.DataTemplate, System.Windows.DataTrigger, and System.Windows.Controls.DataTemplateSelector to specify the presentation of your data.
Download |
Data Templating Overview Changing a Collection by Using IEditableCollectionView Sample This sample uses the members that are provided by the System.ComponentModel.IEditableCollectionView interface to add and change items in a System.Windows.Controls.ListView.
Download |
IEditableCollectionView Interface Sorting and Filtering Items in a View Sample This sample shows how to use a collection view to apply a sort order and filtering.
Download |
How to: Filter Data in a View Drag and Drop
Drag and Drop an Object on a Canvas Sample This example shows how to move objects on a System.Windows.Controls.Canvas using drag and drop. In addition, this sample shows how to apply an adorner and an animation to the object as it is being moved.
Download |
Drag and Drop Overview Load a Dropped File Sample This sample will open and display the contents of a text file dropped on the sample.
Download |
DataObject Class Thumb Drag Functionality Sample This example shows how to use a System.Windows.Controls.Primitives.Thumb to resize a System.Windows.Controls.Canvas control by responding to the System.Windows.Controls.Primitives.Thumb.DragDelta event.
Download |
How to: Use a Thumb to Enable Dragging Packaging
Reading a Package Sample This sample shows how to read content, resource, and relationship parts from a XML Paper Specification (XPS) System.IO.Packaging.Package.
Download |
Documents in WPF Writing a Package Sample This sample shows how to write content, resource, and relationship parts to a XML Paper Specification (XPS) System.IO.Packaging.Package.
Download |
Documents in WPF Creating a Package with a Digital Signature Sample This sample shows how to write a XML Paper Specification (XPS) package with digitally signed content, and then read and validate the signed elements.
Download |
PackageDigitalSignatureManager Class Typography
Advanced Text Formatting Sample This sample shows how to create and use the Microsoft .NET Framework text engine.
Download |
Advanced Text Formatting Brushes
Brushes Sample This sample shows how to paint with solid colors, gradients, images, and drawings. It shows how to use features common to all brushes, such as the System.Windows.Media.Brush.Transform, System.Windows.Media.Brush.RelativeTransform, and System.Windows.Media.Brush.Opacity properties. It also demonstrates how to animate System.Windows.Media.SolidColorBrush and System.Windows.Media.GradientBrush objects.
Download |
WPF Brushes Overview ImageBrush Sample This sample shows how to use an System.Windows.Media.ImageBrush to paint an area with an image. It also shows how to create patterns from an image.
Download |
WPF Brushes Overview VisualBrush Sample This sample shows how to use a System.Windows.Media.VisualBrush to paint an area with text, controls, and shapes. It also shows how to use a visual brush to magnify a portion of the screen and create a reflection.
Download |
WPF Brushes Overview Opacity Masking Sample This sample shows how to create opacity masks and apply them to elements.
Download |
DrawingBrush Class Geometries
Geometries Sample This sample shows how to create and use geometries.
Download |
Geometry Overview Point Sample This sample demonstrates the different operations of the System.Windows.Point structure.
Download |
Point Structure Vector Sample This sample shows how to use the various methods and properties of the System.Windows.Vector structure.A list of radio buttons is created that selects the operation to perform.
Download |
Vector Structure Clip Region Sample This sample shows how to define System.Windows.UIElement.Clip regions.
Download |
How to: Animate a Clip Region Converter Sample This sample shows how to use the converter classes to convert an instance of a type into a string.
Download |
PointConverter Class Images
ImageView Sample This sample shows a simple image viewing utility using the System.Windows.Controls.Image and System.Windows.Media.Imaging.BitmapImage objects.
Download |
Imaging Overview Win32 Sample Codec This sample demonstrates how to create a custom codec can be built using the unmanaged WPF Imaging Component API.
Download |
Imaging Overview Shapes
Shape Elements Sample This sample shows how to draw by using the following System.Windows.Shapes.Shape elements:
System.Windows.Shapes.Ellipse, System.Windows.Shapes.Line, System.Windows.Shapes.Path, System.Windows.Shapes.Polygon, System.Windows.Shapes.Polyline, and System.Windows.Shapes.Rectangle.
Download |
WPF Graphics, Animation, and Media Overview Transformations
2-D Transforms Sample This sample shows how to create, use, and animate two-dimensional transforms.
Download |
Transforms Overview Matrix Sample This sample shows how to use the various methods and properties of the System.Windows.Media.Matrix structure.
Download |
Matrix Structure 3-D Graphics
3-D Hit Testing Sample This sample provides information about hit testing on an animated 3-D model.
Download |
How to: Hit Test in a Viewport3D 3-D Lights Sample This sample shows how to use the various methods and properties of the System.Windows.Media.Media3D.AmbientLight, System.Windows.Media.Media3D.DirectionalLight, and System.Windows.Media.Media3D.PointLight, objects.
Download |
System.Windows.Media.Media3D Namespace 3-D Mesh Sample This sample shows how to build meshes and group models to compose a 3-D scene in procedural code.
Download |
Point3DCollection Class 3-D Scene Sample This sample shows how to create and draw in a 3-D scene.
Download |
3-D Graphics Overview 3-D Scene Animation Rotation Code Sample This sample shows how to animate a rotation transformation on a 3-D model in procedural code.
Download |
PerspectiveCamera Class 3-D Solids Sample This sample applies images to several different 3-D models and shows how to re-use application resources in building a 3-D scene.
Download |
System.Windows.Media.Media3D Namespace Animated Rotation Markup Sample This sample shows how to animate a rotation transformation on a 3-D model.
Download |
3-D Transformations Overview MatrixTransform3D Viewer Sample This sample provides a 3-D scene and some basic controls to demonstrate the effects of different Matrix3D values on transformations applied to a 3-D model.
Download |
3-D Transformations Overview Point3D Sample This sample shows how to use the various methods and properties of the System.Windows.Media.Media3D.Point3D structure.
Download |
Point3D Structure Point4D Sample This sample shows how to use the various methods and properties of the System.Windows.Media.Media3D.Point4D structure.
Download |
Point4D Structure Quaternion Viewer Sample This sample provides a 3-D scene and some basic controls to demonstrate the effects of different quaternion values on transformations applied to a 3-D model.
Download |
System.Windows.Media.Media3D Namespace Size3D Sample This sample shows how to use the various methods and properties of the System.Windows.Media.Media3D.Size3D structure.
Download |
Size3D Structure Vector3D Sample This sample shows how to use the various methods and properties of the System.Windows.Media.Media3D.Vector3D structure.
Download |
Vector3D Structure UIElement3D Sphere Sample This sample shows how to create a Sphere class that derives from System.Windows.UIElement3D.
Download |
UIElement3D Class Interactive 2-D on 3-D Sample This sample demonstrates how to place interactive 2-D content, a button in this case, on a 3D object, using the System.Windows.Media.Media3D.Viewport2DVisual3D class.
Download |
Viewport2DVisual3D Class Handling Events in 3-D Sample This sample demonstrates how to create 3-D objects that respond to events using the System.Windows.Media.Media3D.ContainerUIElement3D and System.Windows.Media.Media3D.ModelUIElement3D classes. In particular, this sample creates two cubes that respond to mouse-down events.
Download |
UIElement3D Class Animations
Animation Example Gallery This sample shows how to animate a variety of objects, include text, 2-D transforms, and 3-D transforms. It also demonstrates splined interpolation, path animations, and custom animations.
Download |
Animation Overview Animating the Opacity of an Element Sample This sample shows how to animate the System.Windows.UIElement.Opacity of an element.
Download |
How to: Animate the Opacity of an Element or Brush Animation Timing Behavior Sample This sample shows how to specify when an animation starts, how many times it repeats, whether it accelerates or decelerates, and other timing behaviors.
Download |
Timing Behaviors Overview Custom Animation Sample This sample shows how to create custom animations that simulate bouncing and other interesting effects.
Download |
Custom Animations Overview From, To, and By Animation Target Values Sample This sample shows how to use the System.Windows.Media.Animation.DoubleAnimation.From, System.Windows.Media.Animation.DoubleAnimation.To, and System.Windows.Media.Animation.DoubleAnimation.By values of an animation.
Download |
From/To/By Animations Overview KeyFrame Animation Sample This sample shows how to use key frame animations to animate along a set of target values.
Download |
Key-Frame Animations Overview Key Spline Animation Sample This sample enables you to interactively adjust the key spline of a System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames.
Download |
Key-Frame Animations Overview Path Animation Sample This sample shows how to animate an object along a geometric path.
Download |
Path Animations Overview Visual Layer Programming
Using the CompositionTarget Sample This sample illustrates how to use System.Windows.Media.CompositionTarget object to create custom drawings or animations based on a per-frame callback.
Download |
How to: Render on a Per Frame Interval Using CompositionTarget Hit Test Using DrawingVisuals Sample This sample demonstrates how to use System.Windows.Media.DrawingVisual objects to create lightweight graphics. The sample also shows how to implement hit testing at the visual object level.
Download |
Using DrawingVisual Objects Hit Test with Win32 Interoperation Sample This sample demonstrates how to use the default hit testing support in the visual layer of WPF.
Download |
Hit Testing in the Visual Layer Globalization and Localization
Globalization Homepage Sample This example demonstrates how to build and localize a Homepage.
Download |
WPF Globalization and Localization Overview LocBaml Tool Sample This sample demonstrates how to use the LocBaml tool to parse input files to create localizable resources and generate a localized binary. The C# files build the tool and the XAML files build a DLL to use as input for the LocBaml tool.
Download |
WPF Globalization and Localization Overview Migration and Interoperability
Arranging Windows Forms Controls in WPF Sample This sample shows how to use WPF layout features to arrange Windows Forms controls in a hybrid application.
Download |
Walkthrough: Arranging Windows Forms Controls in WPF Enabling Visual Styles in a Hybrid Application Sample This sample shows how to enable Microsoft Windows XP visual styles on a Windows Forms control hosted in a WPF-based application.
Download |
How to: Enable Visual Styles in a Hybrid Application Hosting a Simple WPF Control in Windows Forms Sample This sample demonstrates how you can host a simple WPF control on Windows Forms. It shows how to receive events and acquire data from the control and modify the control's properties.
Download |
How to: Host a WPF Control in Windows Forms by Using ElementHost Hosting a Win32 ListBox Control in WPF Sample Hosts a Win32 ListBox control on a WPF page. This sample shows how to create and host the control, and how to send and receive messages.
Download |
Walkthrough: Hosting a Simple Win32 Control in a WPF Application Hosting a Windows Forms Composite Control in WPF Sample This sample shows you how to host a Windows Forms control in a WPF page. It also shows how to receive events from the control and modify the control's properties from the page.
Download |
Walkthrough: Hosting a Windows Forms Composite Control in WPF Hosting a Windows Forms Control in WPF Sample This sample demonstrates how to host a Windows Forms control on a WPF page.
Download |
Walkthrough: Hosting a Windows Forms Control in WPF Hosting a Windows Forms Control in WPF by Using XAML Sample This sample demonstrates how to host a Windows Forms control on a WPF page by using XAML.
Download |
Walkthrough: Hosting a Windows Forms Control in WPF by Using XAML Hosting WPF Content in a Win32 Window Sample This sample hosts a WPF page in a Win32 window. The sample shows how to create and host the control, and how to handle communication between the page and the host window.
Download |
Walkthrough: Hosting WPF Content in a Win32 Application Hosting a WPF Composite Control in Windows Forms Sample This sample demonstrates how to host a WPF System.Windows.Controls.UserControl in a Windows Forms control or form.
Download |
Walkthrough: Hosting a WPF Composite Control in Windows Forms Localizing a Hybrid Application Sample This sample shows how to localize WPF elements in a Windows Forms-based hybrid application.
Download |
Walkthrough: Localizing a Hybrid Application Mapping Properties Using the ElementHost Control Sample This sample shows how to use the System.Windows.Forms.Integration.ElementHost.PropertyMap property to map Windows Forms properties to corresponding properties on a hosted WPF element.
Download |
Walkthrough: Mapping Properties Using the ElementHost Control Mapping Properties Using the WindowsFormsHost Element Sample This sample shows how to use the System.Windows.Forms.Integration.WindowsFormsHost.PropertyMap property to map WPF properties to corresponding properties on a hosted Windows Forms control.
Download |
Walkthrough: Mapping Properties Using the WindowsFormsHost Element Win32 Clock Interoperation Sample This sample demonstrates how to host a WPF control inside of a Win32 application.
Download |
Tutorial: Create a Win32 Application Hosting WPF Content Hosting a Win32 HWND in WPF Sample This sample shows how to put an hwnd inside a WPF application.
Download |
WPF and Win32 Interoperation Overview