Skip to content

Do a pass on spelling and markdown linting in markdown only #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions components/Animations/samples/ConnectedAnimations.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,18 @@ Unregisters an element (part of a DataTemplate in a list control) from the Conne

The helper uses the page navigation parameter to decide which list item will be animated during the page navigation. However, in some cases the parameter passed during page navigation is not part of the list. For example, you might be only passing the id of an item as a navigation parameter and not the item itself.

In those cases, you can use the **SetListDataItemForNextConnectedAnnimation** extension method before page navigation to specify which item should be animated.
In those cases, you can use the **SetListDataItemForNextConnectedAnimation** extension method before page navigation to specify which item should be animated.

```csharp
// dataItemToAnimate is an object in the ListViewBase.ItemsSource collection
Frame.SetListDataItemForNextConnectedAnnimation(dataItemToAnimate);
Frame.SetListDataItemForNextConnectedAnimation(dataItemToAnimate);
Frame.Navigate(typeof(DetailsPage), dataItemToAnimate.Id);
```

This method is also helpful when navigating back to an item different from the item it was navigated from.

```csharp
Frame.SetListDataItemForNextConnectedAnnimation(dataItemToAnimate);
Frame.SetListDataItemForNextConnectedAnimation(dataItemToAnimate);
Frame.GoBack();
```

Expand Down Expand Up @@ -174,4 +174,3 @@ In this page, you just need to give the same key.
<TextBlock Margin="0,40" TextWrapping="WrapWholeWords" Text="Lorem ipsum..."/>
</StackPanel>
```

2 changes: 2 additions & 0 deletions components/Behaviors/samples/Behaviors.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The AutoSelectBehavior automatically selects the entire content of its associate
> [!Sample AutoSelectBehaviorSample]

## ViewportBehavior

This behavior allows you to listen an element enter or exit the ScrollViewer viewport.

> [!Sample ViewportBehaviorSample]
Expand All @@ -44,6 +45,7 @@ Empty lists do not receive focus:
> [!Sample FocusBehaviorListSample]

## NavigateToUriAction

This behavior allows you to define a Uri in XAML, similar to a `Hyperlink` or `HyperlinkButton`. This allows you to use a `Button` and still define the Uri in XAML without wiring up the `Click` event in code-behind, or restyling a `HyperlinkButton`.

> [!Sample NavigateToUriActionSample]
1 change: 0 additions & 1 deletion components/CameraPreview/samples/CameraPreview.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ private void CameraPreviewControl_PreviewFailed(object sender, PreviewFailedEven
> [!IMPORTANT]
> As a developer, you will need to make sure the CameraHelper resources used by the control are cleaned up when appropriate. See [CameraHelper documentation](../helpers/CameraHelper.md) for more details


## Examples

Demonstrates using the camera control and camera helper to preview video from a specific media frame source group.
Expand Down
19 changes: 17 additions & 2 deletions components/Converters/samples/Converters.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,75 +15,90 @@ icon: Assets/Converters.png
Converters are an easy way to handle situations where the source and target properties are of a different type. These are often declared in the `.Resources` of your app or page and can be referenced in XAML. In some cases, default converter values can be inverted by setting `ConverterParameter=True`.

## BoolNegationConverter

Converts a boolean to the inverse value (True to False and vice versa)

> [!Sample BoolNegationConverterSample]

## BoolToObjectConverter

Converts a boolean value into an other object. Can be used to convert true/false to e.g. visibility, color, or different images.

> [!Sample BoolToObjectConverterSample]

## BoolToVisibilityConverter

Converts a boolean value into a `Visibility` enumeration. The `ConverterParameter` can be used to invert the logic.

> [!Sample BoolToVisibilityConverterSample]

## ColorToDisplayNameConverter

Converts a color to the approximated display name.

> [!Sample ColorToDisplayNameConverterSample]

## DoubleToObjectConverter

Converts a double value into an other object. Can be used to convert doubles to e.g. visibility, colors , or different images. If `GreaterThan` and `LessThan` are both set, the logic looks for a value between the two values. Otherwise the logic looks for the value to be `GreaterThan` or `LessThan` the specified value.

> [!Sample DoubleToObjectConverterSample]

## DoubleToVisibilityConverter

Converts a double value into an other object. Can be used to convert doubles to e.g. visibility, colors , or different images. If `GreaterThan` and `LessThan` are both set, the logic looks for a value between the two values. Otherwise the logic looks for the value to be `GreaterThan` or `LessThan` the specified value.

> [!Sample DoubleToVisibilityConverterSample]

## EmptyCollectionToObjectConverter & CollectionVisibilityConverter

Converts a collection size into an other object. Can be used to convert to bind a visibility, a color or an image to the size of the collection. The `CollectionVisibilityConverter` is derived from it and can be easily used to convert a collection into a `Visibility` enumeration (Collapsed if the given collection is empty or null).
Note: this converter only checks the initial state of a collection and does not detect any updates. For that scenario, using a `IsNullOrEmptyStateTrigger` is more appropriate.
Note: this converter only checks the initial state of a collection and does not detect any updates. For that scenario, using a `IsNullOrEmptyStateTrigger` is more appropriate.

> [!Sample CollectionVisibilityConverterSample]

## EmptyObjectToObjectConverter, EmptyStringToObjectConverter & StringToVisibilityConverter

Converts an object value into a an object (if the value is null returns the false value). Can be used to bind a visibility, a color or an image to the value of an object.
The `EmptyStringToObjectConverter` converts a string value into a an object (if the value is null or empty returns the false value). Can be used to bind a visibility, a color or an image to the value of a string.

> [!Sample EmptyStringToObjectConverterSample]

## FileSizeToFriendlyStringConverter

Converts a file size in bytes to a more human-readable friendly format using `ToFileSizeString(Int64)`.

> [!Sample FileSizeToFriendlyStringConverterSample]

## ResourceNameToResourceStringConverter

Converts a source string from the App resources and returns its value, if found.

## StringFormatConverter

This allows you to format a string property upon binding wrapping [string.Format](https://learn.microsoft.com/dotnet/api/system.string.format?view=netstandard-2.0).
It only allows for a single input value (the binding string), but can be formatted with the regular string.Format
methods.

> [!Sample StringFormatConverterSample]

## StringVisibilityConverter

Converts a string value into a Visibility value (if the value is null or empty returns a collapsed value).

> [!Sample StringVisibilityConverterSample]

## TaskResultConverter

Converter that can be used to safely retrieve results from `Task<TResult>` instances. See the [MVVM Toolkit Gallery](https://aka.ms/mvvmtoolkit/app) for an example.

## TypeToObjectConverter

Returns an object or another, depending on whether the type of the provided value matches another provided Type.
> [!Sample TypeToObjectConverterSample]

## VisibilityToBoolConverter
Converts a `Visibility` enumaration to a boolean value.

Converts a `Visibility` enumeration to a boolean value.

> [!Sample VisibilityToBoolConverterSample]
4 changes: 2 additions & 2 deletions components/Extensions/samples/ListViewExtensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ Use SmoothScrollIntoView helps to scroll the item into the view with animation.

```csharp
// Scrolling with index
await MyGridView.SmoothScrollIntoViewWithIndexAsync(index: int, itemPlacement: ItemPlacement, disableAnimation: bool, scrollIfVisibile: bool, additionalHorizontalOffset: int, additionalVerticalOffset: int);
await MyGridView.SmoothScrollIntoViewWithIndexAsync(index: int, itemPlacement: ItemPlacement, disableAnimation: bool, scrollIfVisible: bool, additionalHorizontalOffset: int, additionalVerticalOffset: int);

// Scrolling with item
await MyGridView.SmoothScrollIntoViewWithItemAsync(item: object, itemPlacement: ItemPlacement, disableAnimation: bool, scrollIfVisibile: bool, additionalHorizontalOffset: int, additionalVerticalOffset: int);
await MyGridView.SmoothScrollIntoViewWithItemAsync(item: object, itemPlacement: ItemPlacement, disableAnimation: bool, scrollIfVisible: bool, additionalHorizontalOffset: int, additionalVerticalOffset: int);
```

We can use this extension to make the selected item always centered:
Expand Down
1 change: 0 additions & 1 deletion components/Extensions/samples/MatrixExtensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ icon: Assets/Extensions.png
---

The `MatrixExtensions` type provides methods to transform a [`Matrix`](https://learn.microsoft.com/uwp/api/Windows.UI.Xaml.Media.Matrix) (Rotate, Scale, Translate, etc...). These are a similar subset of methods originally provided in the [System.Windows.Media.Matrix](https://learn.microsoft.com/dotnet/api/system.windows.media.matrix) class.

2 changes: 1 addition & 1 deletion components/Extensions/samples/ScrollViewerExtensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public class DoubleTopThicknessConverter : IValueConverter
Here is how this property can be used in XAML:

```xaml
<!-- Setting MiddleClickScrolling directely for ScrollViewer -->
<!-- Setting MiddleClickScrolling directly for ScrollViewer -->
<ScrollViewer
xmlns:ui="using:CommunityToolkit.WinUI"
ui:ScrollViewerExtensions.EnableMiddleClickScrolling="True">
Expand Down
4 changes: 2 additions & 2 deletions components/Extensions/samples/StringExtensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ The `StringExtensions` type contains helpers and extensions for `string` objects
using CommunityToolkit.WinUI;

string str = "[email protected]";
bool isvalid = str.IsEmail(); //Returns true
bool isValid = str.IsEmail(); //Returns true

string str = "123+888";
bool isvalid = str.IsDecimal(); //Returns false
bool isValid = str.IsDecimal(); //Returns false
```

### Formats Supported for **IsPhoneNumber** Extension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ public static async Task SmoothScrollIntoViewWithIndexAsync(this ListViewBase li
/// <param name="item">The data item to bring into view</param>
/// <param name="itemPlacement">Set the item placement after scrolling</param>
/// <param name="disableAnimation">Set true to disable animation</param>
/// <param name="scrollIfVisibile">Set true to disable scrolling when the corresponding item is in view</param>
/// <param name="scrollIfVisible">Set true to disable scrolling when the corresponding item is in view</param>
/// <param name="additionalHorizontalOffset">Adds additional horizontal offset</param>
/// <param name="additionalVerticalOffset">Adds additional vertical offset</param>
/// <returns>Returns <see cref="Task"/> that completes after scrolling</returns>
public static async Task SmoothScrollIntoViewWithItemAsync(this ListViewBase listViewBase, object item, ScrollItemPlacement itemPlacement = ScrollItemPlacement.Default, bool disableAnimation = false, bool scrollIfVisibile = true, int additionalHorizontalOffset = 0, int additionalVerticalOffset = 0)
public static async Task SmoothScrollIntoViewWithItemAsync(this ListViewBase listViewBase, object item, ScrollItemPlacement itemPlacement = ScrollItemPlacement.Default, bool disableAnimation = false, bool scrollIfVisible = true, int additionalHorizontalOffset = 0, int additionalVerticalOffset = 0)
{
await SmoothScrollIntoViewWithIndexAsync(listViewBase, listViewBase.Items.IndexOf(item), itemPlacement, disableAnimation, scrollIfVisibile, additionalHorizontalOffset, additionalVerticalOffset);
await SmoothScrollIntoViewWithIndexAsync(listViewBase, listViewBase.Items.IndexOf(item), itemPlacement, disableAnimation, scrollIfVisible, additionalHorizontalOffset, additionalVerticalOffset);
}

/// <summary>
Expand Down
14 changes: 2 additions & 12 deletions components/HeaderedControls/samples/HeaderedItemsControl.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,10 @@ discussion-id: 0
issue-id: 0
icon: Assets/HeaderedItemsControl.png
---
The `Header` property can be any object and you can use the `HeaderTemplate` to specify a custom look to the header. Similiar objects can be set for the `Footer` and `FooterTemplate`.

The `Header` property can be any object and you can use the `HeaderTemplate` to specify a custom look to the header. Similar objects can be set for the `Footer` and `FooterTemplate`.

> [!NOTE]
> Setting the `Background`, `BorderBrush` and `BorderThickness` properties will not have any effect on the HeaderedItemsControl. This is to maintain the same functionality as the ItemsControl.

> [!Sample HeaderedItemsControlSample]

## Syntax

```xaml
<Page ...
xmlns:controls="using:CommunityToolkit.WinUI.Controls"/>

<controls:HeaderedItemsControl>
<!-- Header content or HeaderTemplate content -->
</controls:HeaderedItemsControl>
```
15 changes: 2 additions & 13 deletions components/HeaderedControls/samples/HeaderedTreeView.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: HeaderedTreeView
author: michaelhawker
author: michael-hawker
description: The HeaderedTreeView allows a treeview to be displayed with a specified header.
keywords: HeaderedTreeView, Control, Layout, treeview
dev_langs:
Expand All @@ -11,18 +11,7 @@ discussion-id: 0
issue-id: 0
icon: Assets/HeaderedTreeView.png
---
The `Header` property can be any object and you can use the `HeaderTemplate` to specify a custom look to the header. Similiar objects can be set for the `Footer` and `FooterTemplate`.

The `Header` property can be any object and you can use the `HeaderTemplate` to specify a custom look to the header. Similar objects can be set for the `Footer` and `FooterTemplate`.

> [!Sample HeaderedTreeViewSample]

## Syntax

```xaml
<Page ...
xmlns:controls="using:CommunityToolkit.WinUI.Controls"/>

<controls:HeaderedTreeView>
<!-- Header content or HeaderTemplate content -->
</controls:HeaderedTreeView>
```
1 change: 0 additions & 1 deletion components/Helpers/samples/CameraHelper.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ private void CameraHelper_FrameArrived(object sender, FrameEventArgs e)
}
```


## Cleaning up resources

As a developer, you will need to make sure the CameraHelper resources are cleaned up when appropriate. For example, if the CameraHelper is only used on one page, make sure to clean up the CameraHelper when navigating away from the page.
Expand Down
2 changes: 1 addition & 1 deletion components/Helpers/samples/ColorHelper.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: ColorHelper
author:
description: Convert colors from text names, HTML hex, HSV, or HSL to Windows UI Colors (and back again).
keywords: Helpers, Theming, theme listerner, themes, screenunithelper, colorhelper
keywords: Helpers, Theming, theme listener, themes, screenunithelper, colorhelper
dev_langs:
- csharp
category: Helpers
Expand Down
2 changes: 1 addition & 1 deletion components/Helpers/samples/ThemeListener.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Theme Listener
author: williamabradley
description: The ThemeListener allows you to keep track of changes to the current Application Them, and when it is changed via System Theme changes.
keywords: Helpers, Theming, theme listerner, themes
keywords: Helpers, Theming, theme listener, themes
dev_langs:
- csharp
category: Helpers
Expand Down
3 changes: 0 additions & 3 deletions components/ImageCropper/samples/ImageCropper.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ using (var fileStream = await someFile.OpenAsync(FileAccessMode.ReadWrite, Stora
}
```


### Use Circular ImageCropper

You can set `CropShape` property to use the circular ImageCropper.
Expand All @@ -56,7 +55,6 @@ You can set `CropShape` property to use the circular ImageCropper.
ImageCropper.CropShape = CropShape.Circular;
```


### Change Aspect Ratio

You can set `AspectRatio` property to change the aspect ratio of the cropped image.
Expand All @@ -65,7 +63,6 @@ You can set `AspectRatio` property to change the aspect ratio of the cropped ima
ImageCropper.AspectRatio = 16d / 9d;
```


Or you can crop image without aspect ratio.

```csharp
Expand Down
4 changes: 2 additions & 2 deletions components/Media/samples/EffectAnimations.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Apply and animate a Win2D BlurEffect

## ColorEffectAnimation

Animate an overlayed color with a Win2D ColorEffect.
Animate an overlaid color with a Win2D ColorEffect.

> [!SAMPLE ColorEffectAnimationSample]

Expand All @@ -42,7 +42,7 @@ Animate the exposure with a Win2D ExposureEffect.

## HueRotationEffectAnimation

Animate Hue to a specific angle using a Win2D HueRotationEffect.
Animate Hue to a specific angle using a Win2D HueRotationEffect.

> [!SAMPLE HueRotationEffectAnimationSample]

Expand Down
8 changes: 5 additions & 3 deletions components/Primitives/samples/StaggeredSamples.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: StaggeredLayout / StaggeredPanel
author: skendrot
description: The StaggeredLayout / StaggeredPanel virtualizes items in a column approach where an item will be added to whichever column has used the least amount of space.
description: The StaggeredLayout and StaggeredPanel display items in a column approach where an item will be added to whichever column has used the least amount of space.
keywords: StaggeredPanel, StaggeredLayout, Layout
dev_langs:
- csharp
Expand All @@ -12,13 +12,15 @@ issue-id: 0
icon: Assets/StaggeredPanel.png
---

# StaggeredLayout
## StaggeredLayout

The `StaggeredLayout` allows for layout of items in a column approach where an item will be added to whichever column has used the least amount of space.

It is a Layout for `ItemsRepeater` which will provide better virtualization compared to the `StaggeredPanel` below.

> [!SAMPLE StaggeredLayoutSample]

# StaggeredPanel
## StaggeredPanel

The `StaggeredPanel` allows for layout of items in a column approach where an item will be added to whichever column has used the least amount of space.

Expand Down
1 change: 0 additions & 1 deletion components/Primitives/samples/WrapPanel.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ When the Orientation is Vertical, HorizontalSpacing adds uniform spacing between

> [!SAMPLE WrapPanelSample]


## Examples

The following example of adding WrapPanel Control.
Expand Down
2 changes: 1 addition & 1 deletion components/RangeSelector/samples/RangeSelector.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ issue-id: 0
icon: Assets/RangeSelector.png
---

A `RangeSelector` is pretty similiar to a regular `Slider`, and shares some of its properties such as `Minimum`, `Maximum` and `StepFrequency`.
A `RangeSelector` is pretty similar to a regular `Slider`, and shares some of its properties such as `Minimum`, `Maximum` and `StepFrequency`.

> [!Sample RangeSelectorSample]

Expand Down
2 changes: 0 additions & 2 deletions components/RichSuggestBox/samples/RichSuggestBox.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,3 @@ The example below creates a `RichSuggestBox` that only allows users to enter pla
```

> [!Sample RichSuggestBoxPlainTextSample]


3 changes: 2 additions & 1 deletion components/Segmented/samples/Segmented.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ The `Segmented` control is best used with 2-5 items and does not support overflo
> [!Sample SegmentedBasicSample]

## Selection
`Segmented` supports single and multi-selection. When `SelectionMode` is set to `Single` the first item will be selected by default. This can be overriden by settings `AutoSelection` to `false`.

`Segmented` supports single and multi-selection. When `SelectionMode` is set to `Single` the first item will be selected by default. This can be overridden by settings `AutoSelection` to `false`.

## Other styles

Expand Down
2 changes: 1 addition & 1 deletion components/SettingsControls/samples/SettingsCard.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ issue-id: 0
icon: Assets/SettingsCard.png
---

SettingsCard is a control that can be used to display settings in your experience. It uses the default styling found in Windows 11 and is easy to use, meets all accesibility standards and will make your settings page look great!
SettingsCard is a control that can be used to display settings in your experience. It uses the default styling found in Windows 11 and is easy to use, meets all accessibility standards and will make your settings page look great!
You can set the `Header`, `Description`, `HeaderIcon` and `Content` properties to create an easy to use experience, like so:

> [!SAMPLE SettingsCardSample]
Expand Down
2 changes: 1 addition & 1 deletion components/SettingsControls/samples/SettingsExpander.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ issue-id: 0
icon: Assets/SettingsExpander.png
---

The `SettingsExpander` can be used to group multiple `SettingsCard`s into a single collapsable group.
The `SettingsExpander` can be used to group multiple `SettingsCard`s into a single collapsible group.

A `SettingsExpander` can have it's own content to display a setting on the right, just like a `SettingsCard`, but in addition can have any number of extra `Items` to include as additional settings. These items are `SettingsCard`s themselves, which means you can easily move a setting into or out of Expanders just by cutting and pasting their XAML!

Expand Down
Loading