Added documentation for samples

This commit is contained in:
Harikm 2015-08-16 11:47:50 -07:00
Родитель 6debd9e34d
Коммит a310f03abf
20 изменённых файлов: 59 добавлений и 181 удалений

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Overriding the Logical Tree Sample
Although it is not necessary in most cases, advanced control authors have the option of overriding the logical tree. This example describes how to subclass StackPanel to override the logical tree.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Searching for an Element Sample
This example describes how to search for an element.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Adding an Event Handler Sample
This example describes how to add an event handler to an element using code, potentially at a time when the initial Extensible Application Markup Language (XAML) pages are already loaded for the application.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,15 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Custom Routed Events Sample
This example shows you how to create a custom routed event and use it in a separate project.
For more information on event routing, see [Routed Events Overview](https://msdn.microsoft.com/en-us/library/ms742806.aspx). For an example of routed event handling, see [Create a Custom Routed Event](https://msdn.microsoft.com/en-us/library/ms752288.aspx).
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Finding the Source Element in an Event Handler Sample
This example describes how to find the source element of an element in the event handler, by accessing event arguments from an event that was routed to an element other than the one that raised the event.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Routed Event Handling Sample
This example shows you how bubbling routed events work, and how to write an event handler for a routed event.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,15 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# PropertyChanged and CoerceValue Callbacks Sample
This example illustrates how to implement callbacks for dependency properties. The dependencies illustrated here are deliberately complex, and illustrate some of the challenges that you will face if you create complex dependencies and also attempt to update constrained values as part of a user interface. It is deliberately not intended as a best practice for all aspects of how to implement callbacks, and is more intended to show the possible complexities. It features two different templates that present the same control information in two different representations.
You should experiment with the sample and make your own choices about how you could represent this same Minimum/Current/Maximum relationship by using fewer constraints in favor of hard-coded values, or not exposing as many aspects of the properties to user control.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,17 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Custom Classes with Dependency Properties Sample
This sample shows how to create and register dependency properties for use in the same application, instead of defining dependency properties as part of a separate assembly.
This example illustrates the following scenarios:
- A class registers a dependency property for its own use.
- A class implements several callbacks, such as CoerceValueCallback, PropertyChangedCallback, and ValidateValueCallback, for a set of related dependency properties. The callbacks are also used to adjust the values of other properties or to prevent an initial invalid value set. These callbacks are registered as part of the dependency property characteristics of a dependency property. Whenever the appropriate condition is detected by the property system, the user-defined callback is invoked. For instance, a change in the effective value of a property invokes the registered PropertyChangedCallback .
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Restoring Default Values Sample
This example describes how to clear any locally set values and restore the default values of dependency properties by calling the ClearValue method on an instance, specifying several distinct dependency properties to clear.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Application Resources Sample
This example shows you how to define and access application resources.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Defining a Resource Sample
This example demonstrates how to define a resource at the page root level on a FrameworkElement and reference it in attributes of child elements.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Merged ResourceDictionary Sample
This example illustrates the merged-dictionary capabilities of ResourceDictionary. A merged dictionary can be used to incorporate a resource dictionary that comes from a separate file (typically this is a noncompiled XAML file that is included in the application, and referenced by pack URI). To see some of this behavior yourself by modifying this sample, try introducing deliberate identical key names into the base dictionary, or either of the two merged dictionaries.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Alternating Appearance Sample
This sample shows how to implement Alternating appearance.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Content Control Style Sample
Content controls do not have default system styles. This example demonstrates how to add a style to a content control so that it will have a visual appearance.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Event Triggers Sample
This example demonstrates how to use EventTrigger elements to animate the MouseEnter and OnMouseLeave events of a Rectangle.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,15 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Finding Template-Generated Elements Sample
This application demonstrates the following:
- How to find an item generated by a ControlTemplate.
- How to find an item generated by a DataTemplate.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,13 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# 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.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,12 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# Multithreading Web Browser Sample
This sample demonstrates how to create a multi threaded web browsing application.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,15 @@
# %Sample% sample
This sample shows how to use the %objective
## Remarks
# 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.
This sample has a Button which when clicked starts calculating prime numbers. This calculation is theoretically unending, so if the event handler simple went into a loop and started calculating prime numbers, the call would never return and the UI thread would freeze.
To avoid this, the sample queues an asynchronous job onto the Dispatcher of the UI thread by calling BeginInvoke. The job that is pushed on the queue processes one number when the UI thread is in the SystemIdle state and pushes another call on the dispatcher to process the next number the next time the UI thread is idle.
This insures that the UI thread will always take precedence over calculating the next number and it keeps the UI from hanging.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.

Просмотреть файл

@ -1,20 +1,20 @@
# Weather Service Simulation Via Dispatcher Sample
This sample demonstrates how to keep a blocking operation from making an application unresponsive.
# %Sample% sample
This sample simulates a weather service application which queries a remote resource. While the application is querying the remote resource, the UI should not be unresponsive. To solve this, a background thread retrieves the information. When the thread has completed its task, it pushes a job onto dispatcher of the UI thread.
This sample shows how to use the %objective
A background thread is created by calling BeginInvoke on the delegate object. This is an asynchronous call that uses a threadpool thread, so there is no other work we need to do with regards to thread creation.
## Remarks
The delay of connecting to the remote service is simulated by putting the worker thread to sleep. When the job is finished it pushes another job onto the Dispatcher of the UI thread to update the UI with the weather forecast information.
This sample also demonstrates animation and storyboards. Most of the animation is defined in the XAML file, while the starting and stopping of the animation is handled in the code behind.
## Build the sample
The easiest way to use these samples without using Git is to download the zip file containing the current version (using the link below or by clicking the "Download ZIP" button on the repo page). You can then unzip the entire archive and use the samples in [Visual Studio 2015](https://www.visualstudio.com/wpf-vs).
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.