Skip to content

Commit 2e3e9c2

Browse files
authored
Merge branch 'master' into jamesmcroft/3517-bladeview-automation
2 parents 795993f + 06eed0d commit 2e3e9c2

File tree

56 files changed

+1845
-555
lines changed

Some content is hidden

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

56 files changed

+1845
-555
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ assignees: ''
77

88
---
99

10-
<!--
11-
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.
12-
ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
13-
-->
10+
<!-- 🚨 Please Do Not skip any instructions and information mentioned below as they are all required and essential to investigate the issue. Issues with missing information may be closed without investigation 🚨 -->
1411

1512
## Describe the bug
1613
A clear and concise description of what the bug is.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ assignees: ''
77

88
---
99

10+
<!-- 🚨 Please provide detailed information and Do Not skip any instructions as they are all required and essential to help us understand the feature 🚨 -->
11+
1012
## Describe the problem this feature would solve
1113
<!-- Please describe or link to any existing issues or discussions.
1214
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

.github/ISSUE_TEMPLATE/question.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Hi!
1313
We try and keep our GitHub issue list for bugs and features.
1414
1515
Ideally, it'd be great to post your question on Stack Overflow using the 'windows-community-toolkit' tag here: https://stackoverflow.com/questions/tagged/windows-community-toolkit
16+
🚨 Please provide detailed information that includes examples, screenshots, and relevant issues if possible 🚨
1617
1718
If this is more about a scenario that you think is missing documentation, please file an issue instead at https://github.com/MicrosoftDocs/WindowsCommunityToolkitDocs/issues/new
1819

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- 🚨 Please Do Not skip any instructions and information mentioned below as they are all required and essential to evaluate and test the PR. By fulfilling all the required information you will be able to reduce the volume of questions and most likely help merge the PR faster 🚨 -->
2+
13
## Fixes #
24
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->
35

@@ -38,7 +40,7 @@ Please check if your PR fulfills the following requirements:
3840
- [ ] Contains **NO** breaking changes
3941

4042
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below.
41-
Please note that breaking changes are likely to be rejected. -->
43+
Please note that breaking changes are likely to be rejected within minor release cycles or held until major versions. -->
4244

4345

4446
## Other information

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,8 @@ msbuild.binlog
227227
!/build/tools/packages.config
228228

229229
# Generated file from .ttinclude
230-
**/Generated/TypeInfo.g.cs
230+
**/Generated/TypeInfo.g.cs
231+
232+
# TAEF Log output
233+
WexLogFileOutput
234+
*.wtl

Microsoft.Toolkit.HighPerformance/Streams/MemoryStream.Validate.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ namespace Microsoft.Toolkit.HighPerformance.Streams
1313
internal static partial class MemoryStream
1414
{
1515
/// <summary>
16-
/// Validates the <see cref="Stream.Position"/> argument.
16+
/// Validates the <see cref="Stream.Position"/> argument (it needs to be in the [0, length]) range.
1717
/// </summary>
1818
/// <param name="position">The new <see cref="Stream.Position"/> value being set.</param>
1919
/// <param name="length">The maximum length of the target <see cref="Stream"/>.</param>
2020
[MethodImpl(MethodImplOptions.AggressiveInlining)]
2121
public static void ValidatePosition(long position, int length)
2222
{
23-
if ((ulong)position >= (ulong)length)
23+
if ((ulong)position > (ulong)length)
2424
{
2525
ThrowArgumentOutOfRangeExceptionForPosition();
2626
}

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WrapPanel/WrapPanel.bind

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@
4949
HorizontalSpacing="@[HorizontalSpacing:Slider:5:0-200]@" />
5050
</ItemsPanelTemplate>
5151
</ItemsControl.ItemsPanel>
52+
<ListView.ItemContainerStyle>
53+
<Style TargetType="ListViewItem">
54+
<!-- Change those values to change the WrapPanel's children alignment -->
55+
<Setter Property="VerticalContentAlignment" Value="Center" />
56+
<Setter Property="HorizontalContentAlignment" Value="Center" />
57+
<Setter Property="Padding" Value="0" />
58+
<Setter Property="MinWidth" Value="0" />
59+
<Setter Property="MinHeight" Value="0" />
60+
</Style>
61+
</ListView.ItemContainerStyle>
5262
</ListView>
5363
</Grid>
5464
</Page>

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/WrapPanel/WrapPanelPage.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ private void AddButton_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
6464
{
6565
Category = "Remove",
6666
Thumbnail = "ms-appx:///Assets/Photos/BigFourSummerHeat.jpg",
67-
Width = Rand.Next(120, 180),
68-
Height = Rand.Next(80, 130)
67+
Width = Rand.Next(60, 180),
68+
Height = Rand.Next(40, 140)
6969
});
7070
}
7171

Microsoft.Toolkit.Uwp.SampleApp/readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# How to add new samples
1+
For the latest info, [visit the wiki article here](https://github.com/windows-toolkit/WindowsCommunityToolkit/wiki/Sample-Development).
2+
3+
# How to add new samples
24

35
This document describes how to add a new sample page for a new control you want to add to the toolkit.
46

Microsoft.Toolkit.Uwp.UI.Controls/Expander/Expander.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System;
6+
using Microsoft.Toolkit.Uwp.UI.Automation.Peers;
67
using Windows.System;
78
using Windows.UI.Xaml;
9+
using Windows.UI.Xaml.Automation.Peers;
810
using Windows.UI.Xaml.Controls;
911
using Windows.UI.Xaml.Controls.Primitives;
1012
using Windows.UI.Xaml.Input;
@@ -76,6 +78,15 @@ protected virtual void OnCollapsed(EventArgs args)
7678
Collapsed?.Invoke(this, args);
7779
}
7880

81+
/// <summary>
82+
/// Creates AutomationPeer (<see cref="UIElement.OnCreateAutomationPeer"/>)
83+
/// </summary>
84+
/// <returns>An automation peer for this <see cref="Expander"/>.</returns>
85+
protected override AutomationPeer OnCreateAutomationPeer()
86+
{
87+
return new ExpanderAutomationPeer(this);
88+
}
89+
7990
private void ExpanderToggleButtonPart_KeyDown(object sender, KeyRoutedEventArgs e)
8091
{
8192
if (e.Key != VirtualKey.Enter)

0 commit comments

Comments
 (0)