Skip to content

Commit f5fa77e

Browse files
Merge branch 'master' into u/vgromfeld/bindableAttributeRemoved
2 parents 834995d + f42a884 commit f5fa77e

File tree

78 files changed

+1188
-1847
lines changed

Some content is hidden

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

78 files changed

+1188
-1847
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Fixes #
1+
## Fixes #
22
<!-- Link to relevant issue (for ex: #1234) which will automatically close the issue once the PR is merged -->
33

44
## PR Type

Directory.Build.props

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</PropertyGroup>
2121

2222
<PropertyGroup>
23-
<SignAssembly Condition="'$(SignAssembly)' == '' and '$(IsUwpProject)' != 'true'" >true</SignAssembly>
23+
<SignAssembly Condition="'$(SignAssembly)' == '' and '$(IsUwpProject)' != 'true' and '$(IsTestSampleProject)' != 'true'" >true</SignAssembly>
2424
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)toolkit.snk</AssemblyOriginatorKeyFile>
2525
</PropertyGroup>
2626

@@ -58,11 +58,16 @@
5858
</Choose>
5959

6060
<Choose>
61-
<When Condition="'$(IsTestProject)' != 'true' and '$(IsSampleProject)' != 'true' and '$(IsDesignProject)' != 'true'">
61+
<When Condition="'$(IsDesignProject)' != 'true'">
6262
<ItemGroup>
63-
<!--<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="15.3.83" PrivateAssets="all" />-->
64-
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
63+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive"/>
64+
</ItemGroup>
65+
</When>
66+
</Choose>
6567

68+
<Choose>
69+
<When Condition="'$(IsTestProject)' != 'true' and '$(IsSampleProject)' != 'true' and '$(IsDesignProject)' != 'true'">
70+
<ItemGroup>
6671
<EmbeddedResource Include="**\*.rd.xml" />
6772
<Page Include="**\*.xaml" Exclude="**\bin\**\*.xaml;**\obj\**\*.xaml" SubType="Designer" Generator="MSBuild:Compile" />
6873
<Compile Update="**\*.xaml.cs" DependentUpon="%(Filename)" />

GazeInputTest/App.xaml.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
65
using System;
6+
using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
77
using Windows.ApplicationModel;
88
using Windows.ApplicationModel.Activation;
99
using Windows.UI.Xaml;
@@ -15,9 +15,10 @@ namespace GazeInputTest
1515
/// <summary>
1616
/// Provides application-specific behavior to supplement the default Application class.
1717
/// </summary>
18-
sealed partial class App : Application
18+
public sealed partial class App : Application
1919
{
2020
/// <summary>
21+
/// Initializes a new instance of the <see cref="App"/> class.
2122
/// Initializes the singleton application object. This is the first line of authored code
2223
/// executed, and as such is the logical equivalent of main() or WinMain().
2324
/// </summary>
@@ -47,7 +48,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
4748

4849
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
4950
{
50-
//TODO: Load state from previously suspended application
51+
// TODO: Load state from previously suspended application
5152
}
5253

5354
// Place the frame in the current Window
@@ -63,6 +64,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
6364
// parameter
6465
rootFrame.Navigate(typeof(MainPage), e.Arguments);
6566
}
67+
6668
// Ensure the current window is active
6769
Window.Current.Activate();
6870
}
@@ -75,7 +77,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
7577
/// </summary>
7678
/// <param name="sender">The Frame which failed navigation</param>
7779
/// <param name="e">Details about the navigation failure</param>
78-
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
80+
private void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
7981
{
8082
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
8183
}
@@ -90,7 +92,8 @@ void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
9092
private void OnSuspending(object sender, SuspendingEventArgs e)
9193
{
9294
var deferral = e.SuspendingOperation.GetDeferral();
93-
//TODO: Save application state and stop any background activity
95+
96+
// TODO: Save application state and stop any background activity
9497
deferral.Complete();
9598
}
9699
}

GazeInputTest/GazeInputTest.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@
152152
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
153153
<Version>6.2.9</Version>
154154
</PackageReference>
155+
<PackageReference Include="StyleCop.Analyzers">
156+
<Version>1.0.2</Version>
157+
</PackageReference>
155158
</ItemGroup>
156159
<ItemGroup>
157160
<ProjectReference Include="..\Microsoft.Toolkit.UWP.Input.GazeInteraction\Microsoft.Toolkit.Uwp.Input.GazeInteraction.vcxproj">

GazeInputTest/MainPage.xaml.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
65
using System;
6+
using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
77
using Windows.ApplicationModel.Core;
88
using Windows.UI.Core;
99
using Windows.UI.ViewManagement;
@@ -50,18 +50,18 @@ private void ShowCursor_Toggle(object sender, RoutedEventArgs e)
5050
}
5151
}
5252

53-
int clickCount;
53+
private int _clickCount;
5454

5555
private void OnLegacyInvoked(object sender, RoutedEventArgs e)
5656
{
57-
clickCount++;
58-
HowButton.Content = string.Format("{0}: Legacy click", clickCount);
57+
_clickCount++;
58+
HowButton.Content = string.Format("{0}: Legacy click", _clickCount);
5959
}
6060

6161
private void OnGazeInvoked(object sender, DwellInvokedRoutedEventArgs e)
6262
{
63-
clickCount++;
64-
HowButton.Content = string.Format("{0}: Accessible click", clickCount);
63+
_clickCount++;
64+
HowButton.Content = string.Format("{0}: Accessible click", _clickCount);
6565
e.Handled = true;
6666
}
6767

@@ -71,13 +71,13 @@ private void OnInvokeProgress(object sender, DwellProgressEventArgs e)
7171
{
7272
ProgressShow.Value = 100.0 * e.Progress;
7373
}
74+
7475
ProgressShow.IsIndeterminate = e.State == DwellProgressState.Complete;
7576
e.Handled = true;
7677
}
7778

7879
private async void SpawnClicked(object sender, RoutedEventArgs e)
7980
{
80-
8181
var newView = CoreApplication.CreateNewView();
8282
var newViewId = 0;
8383

Microsoft.Toolkit.Parsers/Markdown/Blocks/HeaderBlock.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ namespace Microsoft.Toolkit.Parsers.Markdown.Blocks
1111
{
1212
/// <summary>
1313
/// Represents a heading.
14+
/// <seealso href="https://spec.commonmark.org/0.29/#atx-headings">Single-Line Header CommonMark Spec</seealso>
15+
/// <seealso href="https://spec.commonmark.org/0.29/#setext-headings">Two-Line Header CommonMark Spec</seealso>
1416
/// </summary>
1517
public class HeaderBlock : MarkdownBlock
1618
{

Microsoft.Toolkit.Parsers/Markdown/MarkdownDocument.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ internal static List<MarkdownBlock> Parse(string markdown, int start, int end, i
233233
realStartOfLine = startOfLine;
234234
endOfLine = startOfLine + 3;
235235
startOfNextLine = Common.FindNextSingleNewLine(markdown, startOfLine, end, out startOfNextLine);
236-
}
237236

238-
paragraphText.Clear();
237+
paragraphText.Clear();
238+
}
239239
}
240240

241241
if (newBlockElement == null && nonSpaceChar == '#' && nonSpacePos == startOfLine)

Microsoft.Toolkit.Uwp.PlatformDifferencesGen/DifferencesGen.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
<DefineConstants>TRACE</DefineConstants>
3131
<ErrorReport>prompt</ErrorReport>
3232
<WarningLevel>4</WarningLevel>
33+
<DocumentationFile>bin\Release\DifferencesGen.xml</DocumentationFile>
34+
<NoWarn>1591</NoWarn>
3335
</PropertyGroup>
3436
<ItemGroup>
3537
<Reference Include="System" />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[*.{cs,vb}]
2+
3+
# SA1601: Partial elements should be documented
4+
dotnet_diagnostic.SA1601.severity = none
5+
dotnet_diagnostic.CS1573.severity = none
6+
dotnet_diagnostic.CS1591.severity = none
7+
dotnet_diagnostic.CS1712.severity = none

Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
<UseVSHostingProcess>false</UseVSHostingProcess>
3333
<ErrorReport>prompt</ErrorReport>
3434
<Prefer32Bit>true</Prefer32Bit>
35-
<DocumentationFile>
36-
</DocumentationFile>
37-
<CodeAnalysisRuleSet>microsoft.toolkit.uwp.sampleapp.ruleset</CodeAnalysisRuleSet>
35+
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
3836
</PropertyGroup>
3937
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
4038
<OutputPath>bin\x86\Release\</OutputPath>
@@ -49,9 +47,7 @@
4947
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
5048
<RunCodeAnalysis>false</RunCodeAnalysis>
5149
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
52-
<DocumentationFile>
53-
</DocumentationFile>
54-
<CodeAnalysisRuleSet>microsoft.toolkit.uwp.sampleapp.ruleset</CodeAnalysisRuleSet>
50+
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
5551
</PropertyGroup>
5652
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
5753
<DebugSymbols>true</DebugSymbols>
@@ -63,7 +59,6 @@
6359
<UseVSHostingProcess>false</UseVSHostingProcess>
6460
<ErrorReport>prompt</ErrorReport>
6561
<Prefer32Bit>true</Prefer32Bit>
66-
<CodeAnalysisRuleSet>microsoft.toolkit.uwp.sampleapp.ruleset</CodeAnalysisRuleSet>
6762
</PropertyGroup>
6863
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
6964
<OutputPath>bin\ARM\Release\</OutputPath>
@@ -78,9 +73,7 @@
7873
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
7974
<RunCodeAnalysis>false</RunCodeAnalysis>
8075
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
81-
<DocumentationFile>
82-
</DocumentationFile>
83-
<CodeAnalysisRuleSet>microsoft.toolkit.uwp.sampleapp.ruleset</CodeAnalysisRuleSet>
76+
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
8477
</PropertyGroup>
8578
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
8679
<DebugSymbols>true</DebugSymbols>
@@ -92,7 +85,6 @@
9285
<UseVSHostingProcess>false</UseVSHostingProcess>
9386
<ErrorReport>prompt</ErrorReport>
9487
<Prefer32Bit>true</Prefer32Bit>
95-
<CodeAnalysisRuleSet>microsoft.toolkit.uwp.sampleapp.ruleset</CodeAnalysisRuleSet>
9688
</PropertyGroup>
9789
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
9890
<OutputPath>bin\x64\Release\</OutputPath>
@@ -107,9 +99,7 @@
10799
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
108100
<RunCodeAnalysis>false</RunCodeAnalysis>
109101
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
110-
<DocumentationFile>
111-
</DocumentationFile>
112-
<CodeAnalysisRuleSet>microsoft.toolkit.uwp.sampleapp.ruleset</CodeAnalysisRuleSet>
102+
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
113103
</PropertyGroup>
114104
<PropertyGroup>
115105
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
@@ -130,9 +120,6 @@
130120
<PackageReference Include="Monaco.Editor">
131121
<Version>0.7.0-alpha</Version>
132122
</PackageReference>
133-
<PackageReference Include="StyleCop.Analyzers">
134-
<Version>1.0.2</Version>
135-
</PackageReference>
136123
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed">
137124
<Version>1.1.0</Version>
138125
</PackageReference>
@@ -385,7 +372,7 @@
385372
<Content Include="Assets\mtns.csv">
386373
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
387374
</Content>
388-
<None Include="Microsoft.Toolkit.Uwp.SampleApp.ruleset" />
375+
<None Include=".editorconfig" />
389376
<Content Include="SamplePages\WeatherLiveTileAndToast\WeatherLiveTileAndToast.png" />
390377
<Content Include="SamplePages\WeatherLiveTileAndToast\WeatherLiveTileAndToastCode.bind" />
391378
<Content Include="SamplePages\ImageEx\ImageExCode.bind" />
@@ -525,6 +512,9 @@
525512
<Compile Include="SamplePages\Eyedropper\EyedropperPage.xaml.cs">
526513
<DependentUpon>EyedropperPage.xaml</DependentUpon>
527514
</Compile>
515+
<Compile Include="SamplePages\ClipToBounds\ClipToBoundsPage.xaml.cs">
516+
<DependentUpon>ClipToBoundsPage.xaml</DependentUpon>
517+
</Compile>
528518
<Compile Include="SamplePages\ImageEx\ImageExLazyLoadingControl.xaml.cs">
529519
<DependentUpon>ImageExLazyLoadingControl.xaml</DependentUpon>
530520
</Compile>
@@ -938,6 +928,13 @@
938928
<SubType>Designer</SubType>
939929
<Generator>MSBuild:Compile</Generator>
940930
</Page>
931+
<Content Include="SamplePages\ClipToBounds\ClipToBoundsCode.bind">
932+
<SubType>Designer</SubType>
933+
</Content>
934+
<Page Include="SamplePages\ClipToBounds\ClipToBoundsPage.xaml">
935+
<SubType>Designer</SubType>
936+
<Generator>MSBuild:Compile</Generator>
937+
</Page>
941938
<Page Include="SamplePages\ImageEx\ImageExLazyLoadingControl.xaml">
942939
<SubType>Designer</SubType>
943940
<Generator>MSBuild:Compile</Generator>
@@ -1449,7 +1446,6 @@
14491446
<PlatformTarget>ARM64</PlatformTarget>
14501447
<UseVSHostingProcess>false</UseVSHostingProcess>
14511448
<ErrorReport>prompt</ErrorReport>
1452-
<CodeAnalysisRuleSet>microsoft.toolkit.uwp.sampleapp.ruleset</CodeAnalysisRuleSet>
14531449
<Prefer32Bit>true</Prefer32Bit>
14541450
</PropertyGroup>
14551451
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
@@ -1463,7 +1459,6 @@
14631459
<PlatformTarget>ARM64</PlatformTarget>
14641460
<UseVSHostingProcess>false</UseVSHostingProcess>
14651461
<ErrorReport>prompt</ErrorReport>
1466-
<CodeAnalysisRuleSet>microsoft.toolkit.uwp.sampleapp.ruleset</CodeAnalysisRuleSet>
14671462
<Prefer32Bit>true</Prefer32Bit>
14681463
</PropertyGroup>
14691464
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />

0 commit comments

Comments
 (0)