Skip to content

Commit 210a542

Browse files
authored
Merge pull request #423 from Microsoft/docpubmaster
DOCS directory for master
2 parents 73cf7cc + 0f7b992 commit 210a542

File tree

82 files changed

+3903
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+3903
-0
lines changed

docs/Getting-Started.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Getting Started with the UWP Community Toolkit
2+
3+
The toolkit is available as NuGet packages that can be added to any existing or new project using Visual Studio.
4+
5+
- 1) Download [Visual Studio 2015 Update 3 with Windows developer tools](https://developer.microsoft.com/en-us/windows/downloads) and the Windows 10 SDK. **Important**: Ensure you choose the custom install option and select the *Universal Windows App Development Tools*.
6+
7+
- 2) Open an existing project, or create a new project using the Blank App template under Visual C# -> Windows -> Universal. **Important**: Build 10586 or higher is supported by current version of the Toolkit.
8+
9+
- 3) In Solution Explorer panel, right click on your project name and select **Manage NuGet Packages**. Search for **Microsoft.Toolkit.UWP**, and choose your desired [NuGet Packages](Nuget-Packages.md) from the list.
10+
11+
![NuGet Packages](resources/images/ManageNugetPackages.png "Manage NuGet Packages Image")
12+
13+
- 4) Add a reference to the toolkit in your XAML pages or C#
14+
15+
16+
- a. In your XAML page, add a reference at the top of your page
17+
18+
```csharp
19+
20+
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
21+
22+
```
23+
24+
- b. In your C# page, add the namespaces to the toolkit
25+
26+
```csharp
27+
28+
using Microsoft.Toolkit.Uwp;
29+
30+
```
31+
32+
33+
- 5) You can copy and paste code snippets for each feature from the [UWP Community Toolkit Sample App](http://aka.ms/uwptoolkitapp).
34+
35+
## Other Resources
36+
37+
Adding the [UI controls to the Visual Studio Toolbox](Toolbox-Support.md) explains deeper integration with Visual Studio.
38+
39+
Download the [UWP Community Toolkit Sample App](http://aka.ms/uwptoolkitapp) from the Windows store to see the controls in an actual app.
40+
41+
We recommend developers new to UWP visit the [Getting Started with UWP Development](https://developer.microsoft.com/en-us/windows/getstarted) pages on the Developer portal.
42+
43+
Visit the [UWP Community Toolkit Github Repository](http://aka.ms/uwptoolkit) to see the current source code, what is coming next, and to clone the repository. Community contributions are welcome!
44+

docs/Nuget-Packages.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# UWP Community Toolkit Nuget Packages
2+
3+
NuGet is a standard package manager for .Net applications that is built into Visual Studio. From your open solution choose the *Tools* menu, *NuGet Package Manger*, *Mange NuGet packages for solution...* to open the UI. Enter one of the package names below to search for it online.
4+
5+
| Link | Description |
6+
| --- | --- |
7+
| Microsoft.Toolkit.Uwp | Main NuGet package includes code only helpers for Colors, Internet Connection detection, Storage file handling, and a Stream helper class. |
8+
| Microsoft.Toolkit.Uwp.Notifications | Notifications Package - Generate tile, toast, and badge notifications for Windows 10 via code. Includes intellisense support to avoid having to use the XML syntax. |
9+
| Microsoft.Toolkit.Uwp.Notifications.Javascript | Notification Packages for JavaScript |
10+
| Microsoft.Toolkit.Uwp.Services | Services Package - This NuGet package includes the service helpers for Bing, Facebook, and Twitter. |
11+
| Microsoft.Toolkit.Uwp.UI | UI Packages - XAML converters, Visual tree extensions and helpers for your XAML UI. |
12+
| Microsoft.Toolkit.Uwp.UI.Animations | Animations and Composition behaviors such as Blur, Fade, Rotate, etc. |
13+
| Microsoft.Toolkit.Uwp.UI.Controls | XAML Controls such as RadialGauge, RangeSelector, etc. |
14+
15+
16+
## Search in Visual Studio
17+
18+
Searching in Visual Studio package manager you should see a list similar to the one below (version numbers may be different, but names should be the same).
19+
20+
![NuGet packages](resources/images/NugetPackages.png "Nuget Packages")
21+
22+
### Getting Started
23+
24+
Read the [getting Started with the UWP Community Toolkit](getting-started.md) for more instructions on using these NuGet Packages in your own projects.
25+
26+
### Windows 10 Store App
27+
28+
Want to see the controls and animations in action before jumping into the code? We have published the [UWP Community Toolkit Sample App](http://aka.ms/uwptoolkitapp) to the Windows 10 store. Download the app and play with the controls live to see what they do before ever writing a line of code.
29+
30+
### GitHub Repository
31+
32+
Visit the [UWP Community Toolkit Github Repository](http://aka.ms/uwptoolkit) to see the current source code, what is coming next, and to clone the repository. Community contributions are welcome!

docs/Toolbox-Support.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Adding the UWP Community Toolkit to your Visual Studio Toolbox
2+
3+
Add the UWP Community Toolkit controls into the Visual Studio toolbox by following these steps:
4+
5+
1) Add the *Microsoft.Toolkit.Uwp.UI.Controls* NuGet package to your application.
6+
7+
2) Open any XAML page and select the Toolbox on the left side of Visual Studio.
8+
9+
3) Right click in a blank area and select *Add Tab*. Name the tab *UWP Community Toolkit Controls*.
10+
11+
4) Right click in the tab you just created and select *Choose Items...*. Then select *Browse* from the *Choose Toolbox Items* dialog and navigate to the folder on your machine:
12+
13+
c:\Users\%USERNAME%\.nuget\packages\Microsoft.Toolkit.Uwp.UI.Controls\
14+
15+
a. Choose the folder name matching the version you have installed, then continue to the *lib\uap10.0* folder and select the *Microsoft.Toolkit.Uwp.UI.Controls.dll* file. You should end up with a dialog similar to the one shown below.
16+
17+
![UI Toolbox Items](resources/images/choosetoolboxitems.png "Choose Toolbox Image")
18+
19+
5) Your toolbox should now have a list of UI Controls from the toolkit that you can drag and drop onto your XAML surfaces.
20+
21+
![Completed Toolbox Items](resources/images/toolboxfinal.png "Toolbox Final Image")
22+

docs/animations/Blur.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Blur
2+
3+
The **Blur animation behavior** selectively blurs a XAML element by increasing or decreasing pixel size.
4+
Sometimes you want an element to appear slightly out of focus, but to be familiar to the user from other locations within an app. Rather than having to rasterize the XAML into an image and apply a blur, you can apply a BlurBehavior to the original element at run time.
5+
6+
**NOTE**: This animation REQUIRES the [Windows 10 Anniversary SDK 14393](https://blogs.windows.com/windowsexperience/2016/07/18/build14393/) 10.0.14393.0 in order for it to work.
7+
8+
## Syntax
9+
10+
You can either use the blur behavior from your XAML code:
11+
12+
```xaml
13+
14+
<interactivity:Interaction.Behaviors>
15+
<behaviors:Blur x:Name="BlurBehavior"
16+
Value="10"
17+
Duration="10"
18+
Delay="0"
19+
AutomaticallyStart="True"/>
20+
</interactivity:Interaction.Behaviors>
21+
22+
```
23+
24+
or directly from code:
25+
26+
```csharp
27+
28+
ToolkitLogo.Blur(value: 10, duration: 10, delay: 0);
29+
30+
```
31+
32+
Behavior animations can also be chained and awaited.
33+
34+
```csharp
35+
36+
Element.Rotate(value: 30f, duration: 0.3).StartAsync();
37+
38+
await Element.Rotate(value: 30f, duration: 0.3).StartAsync();
39+
40+
var anim = element.Rotate(30f).Fade(0.5).Blur(5);
41+
anim.SetDurationForAll(2);
42+
anim.Completed += animation_completed;
43+
anim.StartAsync();
44+
45+
anim.Stop();
46+
47+
```
48+
49+
[Blur Behavior Sample Page Source](https://github.com/Microsoft/UWPCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Blur)
50+
51+
Please view the [toolkit sample application](https://github.com/Microsoft/UWPCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.SampleApp) for the UWP Community Toolkit for current samples and example code.
52+
53+
## Example Image
54+
55+
![Blur Behavior animation](../resources/images/Animations-Blur.gif "Blur Behavior")
56+
57+
## Requirements (Windows 10 Device Family)
58+
59+
| [Device family](http://go.microsoft.com/fwlink/p/?LinkID=526370) | Universal, [Windows 10 Anniversary SDK 14393](https://blogs.windows.com/windowsexperience/2016/07/18/build14393/) 10.0.14393.0 |
60+
| --- | --- |
61+
| Namespace | Microsoft.Toolkit.Uwp.UI.Animations |
62+
63+
## API
64+
65+
* [Blur source code](https://github.com/Microsoft/UWPCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Blur.cs)
66+

docs/animations/Fade.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Fade
2+
3+
The **Fade animation behavior** fades objects, in and out, over time.
4+
5+
## Syntax
6+
7+
```xaml
8+
9+
<behaviors:Fade x:Name="FadeBehavior>"
10+
Value="10.0"
11+
Duration="1.5"
12+
Delay="0.5"
13+
AutomaticallyStart="True">
14+
</behaviors:Fade>
15+
16+
```
17+
18+
or directly from code:
19+
20+
```csharp
21+
22+
MyRectangle.Fade((float)Value, Duration, Delay);
23+
24+
```
25+
26+
Behavior animations can also be chained and awaited.
27+
28+
```csharp
29+
30+
Element.Rotate(value: 30f, duration: 0.3).StartAsync();
31+
32+
await Element.Rotate(value: 30f, duration: 0.3).StartAsync();
33+
34+
var anim = element.Rotate(30f).Fade(0.5).Blur(5);
35+
anim.SetDurationForAll(2);
36+
anim.Completed += animation_completed;
37+
anim.StartAsync();
38+
39+
anim.Stop();
40+
41+
```
42+
43+
[Fade Behavior Sample Page Source](https://github.com/Microsoft/UWPCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Fade)
44+
45+
Please view the [toolkit sample application](https://github.com/Microsoft/UWPCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.SampleApp) for the UWP Community Toolkit for current samples and example code.
46+
47+
## Example Image
48+
49+
![Fade Behavior animation](../resources/images/Animations-Fade.gif "Fade Behavior")
50+
51+
## Requirements (Windows 10 Device Family)
52+
53+
| [Device family](http://go.microsoft.com/fwlink/p/?LinkID=526370) | Universal, 10.0.10586.0 or higher |
54+
| --- | --- |
55+
| Namespace | Microsoft.Toolkit.Uwp.UI.Animations |
56+
57+
## API
58+
59+
* [Fade source code](https://github.com/Microsoft/UWPCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Fade.cs)
60+

docs/animations/FadeHeader.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# FadeHeader
2+
3+
The **FadeHeader behavior** fades a ListView or GridView Header UIElement when the user scrolls. The UIElement fades out to 0 opacity when the edge of the Header reaches the edge of the visible bounds of the ListElement.
4+
5+
## Syntax
6+
7+
### XAML Implementation ###
8+
9+
**Implicit usage**:
10+
11+
Automatically detects the Header element by finding the ListViewBase (note: GridView uses ListViewBase)
12+
13+
```xaml
14+
15+
<interactivity:Interaction.Behaviors>
16+
<behaviors:FadeHeaderBehavior />
17+
</interactivity:Interaction.Behaviors>
18+
19+
```
20+
21+
22+
**Explicit usage**:
23+
24+
Set the ElementName property using the UIElement of the Header manually
25+
26+
```xaml
27+
28+
<interactivity:Interaction.Behaviors>
29+
<behaviors:FadeHeaderBehavior HeaderElement="{Binding ElementName=MyHeaderGrid}" />
30+
</interactivity:Interaction.Behaviors>
31+
32+
```
33+
34+
### C# Implementation ###
35+
36+
Implicit usage:
37+
38+
```csharp
39+
40+
Microsoft.Xaml.Interactivity.Interaction.GetBehaviors(MyListView).Add(new FadeHeaderBehavior());
41+
42+
```
43+
44+
Explicit usage:
45+
46+
```csharp
47+
48+
Microsoft.Xaml.Interactivity.Interaction.GetBehaviors(MyListView).Add(new FadeHeaderBehavior { HeaderElement = MyHeaderGrid });
49+
50+
```
51+
52+
53+
## Example ##
54+
55+
```xaml
56+
57+
<ListView x:Name="MyListView">
58+
<interactivity:Interaction.Behaviors>
59+
<behaviors:FadeHeaderBehavior />
60+
</interactivity:Interaction.Behaviors>
61+
<ListView.Header>
62+
<Grid x:Name="MyHeaderGrid"
63+
MinHeight="250"
64+
Background="{StaticResource Brush-Blue-01}">
65+
<StackPanel VerticalAlignment="Center"
66+
HorizontalAlignment="Center"
67+
Margin="20,0">
68+
<TextBlock Text="This Is The Header"
69+
TextAlignment="Center"
70+
FontWeight="Bold"
71+
Style="{ThemeResource TitleTextBlockStyle}"
72+
Foreground="{StaticResource Brush-White}"
73+
Margin="0,5" />
74+
<TextBlock Text="It starts with 100% opacity but will fade to 0% as you scroll up."
75+
Style="{ThemeResource SubtitleTextBlockStyle}"
76+
Foreground="{StaticResource Brush-White}"
77+
VerticalAlignment="Center"
78+
TextAlignment="Center" />
79+
</StackPanel>
80+
</Grid>
81+
</ListView.Header>
82+
</ListView>
83+
84+
```
85+
86+
87+
[FadeHeader Behavior Sample Page Source](https://github.com/Microsoft/UWPCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/FadeHeader)
88+
89+
Please view the [toolkit sample application](https://github.com/Microsoft/UWPCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.SampleApp) for the UWP Community Toolkit for current samples and example code.
90+
91+
## Example Image
92+
93+
![FadeHeader Behavior animation](../resources/images/Animations-FadeHeader.gif "FadeHeader Behavior")
94+
95+
## Requirements (Windows 10 Device Family)
96+
97+
| [Device family](http://go.microsoft.com/fwlink/p/?LinkID=526370) | Universal, 10.0.10586.0 or higher |
98+
| --- | --- |
99+
| Namespace | Microsoft.Toolkit.Uwp.UI.Animations |
100+
101+
## API
102+
103+
* [FadeHeader source code](https://github.com/Microsoft/UWPCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/FadeHeader.cs)
104+
105+

0 commit comments

Comments
 (0)