Skip to content

Commit c810a39

Browse files
Do a pass on spelling and markdown linting in markdown only (#216)
* Do a pass on spelling and markdown linting in markdown only Caught one issue with spelling in a parameter name as it was in the sample, but didn't explicitly spell check code or sample code... * Update components/Segmented/samples/Segmented.md * Fix Issue with Switch Presenter Crashing in Release Mode See CommunityToolkit/WindowsCommunityToolkit#3909 * Updated SwitchPresenter icon --------- Co-authored-by: Niels Laute <[email protected]>
1 parent 3217d31 commit c810a39

File tree

30 files changed

+61
-64
lines changed

30 files changed

+61
-64
lines changed

components/Animations/samples/ConnectedAnimations.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,18 @@ Unregisters an element (part of a DataTemplate in a list control) from the Conne
8989

9090
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.
9191

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

9494
```csharp
9595
// dataItemToAnimate is an object in the ListViewBase.ItemsSource collection
96-
Frame.SetListDataItemForNextConnectedAnnimation(dataItemToAnimate);
96+
Frame.SetListDataItemForNextConnectedAnimation(dataItemToAnimate);
9797
Frame.Navigate(typeof(DetailsPage), dataItemToAnimate.Id);
9898
```
9999

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

102102
```csharp
103-
Frame.SetListDataItemForNextConnectedAnnimation(dataItemToAnimate);
103+
Frame.SetListDataItemForNextConnectedAnimation(dataItemToAnimate);
104104
Frame.GoBack();
105105
```
106106

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

components/Behaviors/samples/Behaviors.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The AutoSelectBehavior automatically selects the entire content of its associate
2929
> [!Sample AutoSelectBehaviorSample]
3030
3131
## ViewportBehavior
32+
3233
This behavior allows you to listen an element enter or exit the ScrollViewer viewport.
3334

3435
> [!Sample ViewportBehaviorSample]
@@ -44,6 +45,7 @@ Empty lists do not receive focus:
4445
> [!Sample FocusBehaviorListSample]
4546
4647
## NavigateToUriAction
48+
4749
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`.
4850

4951
> [!Sample NavigateToUriActionSample]

components/CameraPreview/samples/CameraPreview.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ private void CameraPreviewControl_PreviewFailed(object sender, PreviewFailedEven
4545
> [!IMPORTANT]
4646
> 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
4747
48-
4948
## Examples
5049

5150
Demonstrates using the camera control and camera helper to preview video from a specific media frame source group.

components/Converters/samples/Converters.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,75 +15,90 @@ icon: Assets/Converters.png
1515
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`.
1616

1717
## BoolNegationConverter
18+
1819
Converts a boolean to the inverse value (True to False and vice versa)
1920

2021
> [!Sample BoolNegationConverterSample]
2122
2223
## BoolToObjectConverter
24+
2325
Converts a boolean value into an other object. Can be used to convert true/false to e.g. visibility, color, or different images.
2426

2527
> [!Sample BoolToObjectConverterSample]
2628
2729
## BoolToVisibilityConverter
30+
2831
Converts a boolean value into a `Visibility` enumeration. The `ConverterParameter` can be used to invert the logic.
2932

3033
> [!Sample BoolToVisibilityConverterSample]
3134
3235
## ColorToDisplayNameConverter
36+
3337
Converts a color to the approximated display name.
3438

3539
> [!Sample ColorToDisplayNameConverterSample]
3640
3741
## DoubleToObjectConverter
42+
3843
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.
3944

4045
> [!Sample DoubleToObjectConverterSample]
4146
4247
## DoubleToVisibilityConverter
48+
4349
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.
4450

4551
> [!Sample DoubleToVisibilityConverterSample]
4652
4753
## EmptyCollectionToObjectConverter & CollectionVisibilityConverter
54+
4855
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).
49-
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.
56+
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.
5057

5158
> [!Sample CollectionVisibilityConverterSample]
5259
5360
## EmptyObjectToObjectConverter, EmptyStringToObjectConverter & StringToVisibilityConverter
61+
5462
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.
5563
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.
5664

5765
> [!Sample EmptyStringToObjectConverterSample]
5866
5967
## FileSizeToFriendlyStringConverter
68+
6069
Converts a file size in bytes to a more human-readable friendly format using `ToFileSizeString(Int64)`.
6170

6271
> [!Sample FileSizeToFriendlyStringConverterSample]
6372
6473
## ResourceNameToResourceStringConverter
74+
6575
Converts a source string from the App resources and returns its value, if found.
6676

6777
## StringFormatConverter
78+
6879
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).
6980
It only allows for a single input value (the binding string), but can be formatted with the regular string.Format
7081
methods.
7182

7283
> [!Sample StringFormatConverterSample]
7384
7485
## StringVisibilityConverter
86+
7587
Converts a string value into a Visibility value (if the value is null or empty returns a collapsed value).
7688

7789
> [!Sample StringVisibilityConverterSample]
7890
7991
## TaskResultConverter
92+
8093
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.
8194

8295
## TypeToObjectConverter
96+
8397
Returns an object or another, depending on whether the type of the provided value matches another provided Type.
8498
> [!Sample TypeToObjectConverterSample]
8599
86100
## VisibilityToBoolConverter
87-
Converts a `Visibility` enumaration to a boolean value.
101+
102+
Converts a `Visibility` enumeration to a boolean value.
88103

89104
> [!Sample VisibilityToBoolConverterSample]

components/Extensions/samples/ListViewExtensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ Use SmoothScrollIntoView helps to scroll the item into the view with animation.
113113

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

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

122122
We can use this extension to make the selected item always centered:

components/Extensions/samples/MatrixExtensions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ icon: Assets/Extensions.png
1313
---
1414

1515
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.
16-

components/Extensions/samples/ScrollViewerExtensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public class DoubleTopThicknessConverter : IValueConverter
9090
Here is how this property can be used in XAML:
9191

9292
```xaml
93-
<!-- Setting MiddleClickScrolling directely for ScrollViewer -->
93+
<!-- Setting MiddleClickScrolling directly for ScrollViewer -->
9494
<ScrollViewer
9595
xmlns:ui="using:CommunityToolkit.WinUI"
9696
ui:ScrollViewerExtensions.EnableMiddleClickScrolling="True">

components/Extensions/samples/StringExtensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ The `StringExtensions` type contains helpers and extensions for `string` objects
2020
using CommunityToolkit.WinUI;
2121

2222
string str = "[email protected]";
23-
bool isvalid = str.IsEmail(); //Returns true
23+
bool isValid = str.IsEmail(); //Returns true
2424
2525
string str = "123+888";
26-
bool isvalid = str.IsDecimal(); //Returns false
26+
bool isValid = str.IsDecimal(); //Returns false
2727
```
2828

2929
### Formats Supported for **IsPhoneNumber** Extension

components/Extensions/src/ListViewBase/ListViewExtensions.SmoothScrollIntoView.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ public static async Task SmoothScrollIntoViewWithIndexAsync(this ListViewBase li
180180
/// <param name="item">The data item to bring into view</param>
181181
/// <param name="itemPlacement">Set the item placement after scrolling</param>
182182
/// <param name="disableAnimation">Set true to disable animation</param>
183-
/// <param name="scrollIfVisibile">Set true to disable scrolling when the corresponding item is in view</param>
183+
/// <param name="scrollIfVisible">Set true to disable scrolling when the corresponding item is in view</param>
184184
/// <param name="additionalHorizontalOffset">Adds additional horizontal offset</param>
185185
/// <param name="additionalVerticalOffset">Adds additional vertical offset</param>
186186
/// <returns>Returns <see cref="Task"/> that completes after scrolling</returns>
187-
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)
187+
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)
188188
{
189-
await SmoothScrollIntoViewWithIndexAsync(listViewBase, listViewBase.Items.IndexOf(item), itemPlacement, disableAnimation, scrollIfVisibile, additionalHorizontalOffset, additionalVerticalOffset);
189+
await SmoothScrollIntoViewWithIndexAsync(listViewBase, listViewBase.Items.IndexOf(item), itemPlacement, disableAnimation, scrollIfVisible, additionalHorizontalOffset, additionalVerticalOffset);
190190
}
191191

192192
/// <summary>

components/HeaderedControls/samples/HeaderedItemsControl.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,10 @@ discussion-id: 0
1111
issue-id: 0
1212
icon: Assets/HeaderedItemsControl.png
1313
---
14-
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`.
14+
15+
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`.
1516

1617
> [!NOTE]
1718
> 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.
1819
1920
> [!Sample HeaderedItemsControlSample]
20-
21-
## Syntax
22-
23-
```xaml
24-
<Page ...
25-
xmlns:controls="using:CommunityToolkit.WinUI.Controls"/>
26-
27-
<controls:HeaderedItemsControl>
28-
<!-- Header content or HeaderTemplate content -->
29-
</controls:HeaderedItemsControl>
30-
```
Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: HeaderedTreeView
3-
author: michaelhawker
3+
author: michael-hawker
44
description: The HeaderedTreeView allows a treeview to be displayed with a specified header.
55
keywords: HeaderedTreeView, Control, Layout, treeview
66
dev_langs:
@@ -11,18 +11,7 @@ discussion-id: 0
1111
issue-id: 0
1212
icon: Assets/HeaderedTreeView.png
1313
---
14-
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`.
1514

15+
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`.
1616

1717
> [!Sample HeaderedTreeViewSample]
18-
19-
## Syntax
20-
21-
```xaml
22-
<Page ...
23-
xmlns:controls="using:CommunityToolkit.WinUI.Controls"/>
24-
25-
<controls:HeaderedTreeView>
26-
<!-- Header content or HeaderTemplate content -->
27-
</controls:HeaderedTreeView>
28-
```

components/Helpers/samples/CameraHelper.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ private void CameraHelper_FrameArrived(object sender, FrameEventArgs e)
5050
}
5151
```
5252

53-
5453
## Cleaning up resources
5554

5655
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.

components/Helpers/samples/ColorHelper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: ColorHelper
33
author:
44
description: Convert colors from text names, HTML hex, HSV, or HSL to Windows UI Colors (and back again).
5-
keywords: Helpers, Theming, theme listerner, themes, screenunithelper, colorhelper
5+
keywords: Helpers, Theming, theme listener, themes, screenunithelper, colorhelper
66
dev_langs:
77
- csharp
88
category: Helpers

components/Helpers/samples/ThemeListener.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Theme Listener
33
author: williamabradley
44
description: The ThemeListener allows you to keep track of changes to the current Application Them, and when it is changed via System Theme changes.
5-
keywords: Helpers, Theming, theme listerner, themes
5+
keywords: Helpers, Theming, theme listener, themes
66
dev_langs:
77
- csharp
88
category: Helpers

components/ImageCropper/samples/ImageCropper.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ using (var fileStream = await someFile.OpenAsync(FileAccessMode.ReadWrite, Stora
4747
}
4848
```
4949

50-
5150
### Use Circular ImageCropper
5251

5352
You can set `CropShape` property to use the circular ImageCropper.
@@ -56,7 +55,6 @@ You can set `CropShape` property to use the circular ImageCropper.
5655
ImageCropper.CropShape = CropShape.Circular;
5756
```
5857

59-
6058
### Change Aspect Ratio
6159

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

68-
6966
Or you can crop image without aspect ratio.
7067

7168
```csharp

components/Media/samples/EffectAnimations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Apply and animate a Win2D BlurEffect
2424
2525
## ColorEffectAnimation
2626

27-
Animate an overlayed color with a Win2D ColorEffect.
27+
Animate an overlaid color with a Win2D ColorEffect.
2828

2929
> [!SAMPLE ColorEffectAnimationSample]
3030
@@ -42,7 +42,7 @@ Animate the exposure with a Win2D ExposureEffect.
4242
4343
## HueRotationEffectAnimation
4444

45-
Animate Hue to a specific angle using a Win2D HueRotationEffect.
45+
Animate Hue to a specific angle using a Win2D HueRotationEffect.
4646

4747
> [!SAMPLE HueRotationEffectAnimationSample]
4848
Loading

components/Primitives/samples/StaggeredSamples.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: StaggeredLayout / StaggeredPanel
33
author: skendrot
4-
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.
4+
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.
55
keywords: StaggeredPanel, StaggeredLayout, Layout
66
dev_langs:
77
- csharp
@@ -12,13 +12,15 @@ issue-id: 0
1212
icon: Assets/StaggeredPanel.png
1313
---
1414

15-
# StaggeredLayout
15+
## StaggeredLayout
1616

1717
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.
1818

19+
It is a Layout for `ItemsRepeater` which will provide better virtualization compared to the `StaggeredPanel` below.
20+
1921
> [!SAMPLE StaggeredLayoutSample]
2022
21-
# StaggeredPanel
23+
## StaggeredPanel
2224

2325
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.
2426

components/Primitives/samples/SwitchPresenter/SwitchPresenterValueSample.xaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
xmlns:ui="using:CommunityToolkit.WinUI"
99
mc:Ignorable="d">
1010

11+
<Page.Resources>
12+
<!--
13+
If you reference an enum directly in UWP, you need to use it somewhere for the XamlTypeInfo reference to be generated...
14+
-->
15+
<local:Animal x:Key="MyAnimal">Cat</local:Animal>
16+
</Page.Resources>
17+
1118
<StackPanel>
1219
<ComboBox x:Name="AnimalPicker"
1320
Header="Pick an Animal"

components/Primitives/samples/WrapPanel.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ When the Orientation is Vertical, HorizontalSpacing adds uniform spacing between
2222

2323
> [!SAMPLE WrapPanelSample]
2424
25-
2625
## Examples
2726

2827
The following example of adding WrapPanel Control.

components/RangeSelector/samples/RangeSelector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ issue-id: 0
1212
icon: Assets/RangeSelector.png
1313
---
1414

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

1717
> [!Sample RangeSelectorSample]
1818

components/RichSuggestBox/samples/RichSuggestBox.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,3 @@ The example below creates a `RichSuggestBox` that only allows users to enter pla
9595
```
9696

9797
> [!Sample RichSuggestBoxPlainTextSample]
98-
99-

components/Segmented/samples/Segmented.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ The `Segmented` control is best used with 2-5 items and does not support overflo
1919
> [!Sample SegmentedBasicSample]
2020
2121
## Selection
22-
`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`.
22+
23+
`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 setting `AutoSelection` to `false`.
2324

2425
## Other styles
2526

0 commit comments

Comments
 (0)