Skip to content

Commit 271555c

Browse files
committed
Windows 11 prerelease - September 2021 Samples Update 2
* PenHaptics: Add missing haptic feedback * New C++/WinRT sample: RadioManager
2 parents 4494f67 + f7bec16 commit 271555c

36 files changed

+754
-55
lines changed

Samples/PenHaptics/cppwinrt/SampleConfiguration.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ std::map<hstring, uint16_t> const& SDKTemplate::WaveformNamesMap()
4848
{ L"InkContinuous", KnownSimpleHapticsControllerWaveforms::InkContinuous() },
4949
{ L"MarkerContinuous", KnownSimpleHapticsControllerWaveforms::MarkerContinuous() },
5050
{ L"PencilContinuous", KnownSimpleHapticsControllerWaveforms::PencilContinuous() },
51+
{ L"Press", KnownSimpleHapticsControllerWaveforms::Press() },
5152
{ L"Release", KnownSimpleHapticsControllerWaveforms::Release() },
5253
{ L"RumbleContinuous", KnownSimpleHapticsControllerWaveforms::RumbleContinuous() },
5354
{ L"Success", KnownSimpleHapticsControllerWaveforms::Success() },

Samples/PenHaptics/cs/SampleConfiguration.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public partial class MainPage : Page
4343
["InkContinuous"] = KnownSimpleHapticsControllerWaveforms.InkContinuous,
4444
["MarkerContinuous"] = KnownSimpleHapticsControllerWaveforms.MarkerContinuous,
4545
["PencilContinuous"] = KnownSimpleHapticsControllerWaveforms.PencilContinuous,
46+
["Press"] = KnownSimpleHapticsControllerWaveforms.Press,
4647
["Release"] = KnownSimpleHapticsControllerWaveforms.Release,
4748
["RumbleContinuous"] = KnownSimpleHapticsControllerWaveforms.RumbleContinuous,
4849
["Success"] = KnownSimpleHapticsControllerWaveforms.Success,

Samples/RadioManager/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ page_type: sample
33
languages:
44
- csharp
55
- cpp
6-
- cppcx
6+
- cppwinrt
77
products:
88
- windows
99
- windows-uwp
@@ -35,6 +35,12 @@ toggle radio state changes, and register for state changes on individual radios.
3535
> the samples collection, and GitHub, see [Get the UWP samples from GitHub](https://aka.ms/ovu2uq).
3636
> For more samples, see the [Samples portal](https://aka.ms/winsamples) on the Windows Dev Center.
3737
38+
## Related topics
39+
40+
### Related samples
41+
42+
[RadioManager](/archived/RadioManager) for C++/CX (archived)
43+
3844
## System requirements
3945

4046
**Client:** Windows 10
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version='1.0' encoding='utf-8'?>
2+
<Package
3+
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
4+
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
5+
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
6+
IgnorableNamespaces="uap mp"
7+
>
8+
<Identity Name="Microsoft.SDKSamples.RadioManager.CPP" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.0.0.0"/>
9+
<mp:PhoneIdentity PhoneProductId="8d84de98-980c-4bae-8062-bc504d0718c3" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
10+
<Properties>
11+
<DisplayName>RadioManager C++/WinRT Sample</DisplayName>
12+
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
13+
<Logo>Assets\storelogo-sdk.png</Logo>
14+
</Properties>
15+
<Dependencies>
16+
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.17763.0"/>
17+
</Dependencies>
18+
<Resources>
19+
<Resource Language="x-generate"/>
20+
</Resources>
21+
<Applications>
22+
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="App">
23+
<uap:VisualElements
24+
DisplayName="RadioManager C++/WinRT Sample"
25+
Square150x150Logo="Assets\squareTile-sdk.png"
26+
Square44x44Logo="Assets\smallTile-sdk.png"
27+
Description="RadioManager C++/WinRT Sample"
28+
BackgroundColor="#00B2F0"
29+
>
30+
<uap:SplashScreen Image="Assets\splash-sdk.png"/>
31+
<uap:DefaultTile>
32+
<uap:ShowNameOnTiles>
33+
<uap:ShowOn Tile="square150x150Logo"/>
34+
</uap:ShowNameOnTiles>
35+
</uap:DefaultTile>
36+
</uap:VisualElements>
37+
</Application>
38+
</Applications>
39+
<Capabilities>
40+
<DeviceCapability Name="radios" />
41+
</Capabilities>
42+
</Package>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//*********************************************************
2+
//
3+
// Copyright (c) Microsoft. All rights reserved.
4+
// This code is licensed under the MIT License (MIT).
5+
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6+
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7+
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8+
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9+
//
10+
//*********************************************************
11+
12+
namespace SDKTemplate
13+
{
14+
[default_interface]
15+
runtimeclass Scenario1_Toggle : Windows.UI.Xaml.Controls.Page
16+
{
17+
Scenario1_Toggle();
18+
}
19+
20+
[Windows.UI.Xaml.Data.Bindable]
21+
runtimeclass RadioModel : Windows.UI.Xaml.Data.INotifyPropertyChanged
22+
{
23+
String Name { get; };
24+
Boolean IsEnabled{ get; };
25+
Boolean IsRadioOn;
26+
}
27+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31702.278
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RadioManager", "RadioManager.vcxproj", "{A2D33437-5635-4832-AD71-08D653A37053}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|ARM = Debug|ARM
11+
Debug|x64 = Debug|x64
12+
Debug|x86 = Debug|x86
13+
Release|ARM = Release|ARM
14+
Release|x64 = Release|x64
15+
Release|x86 = Release|x86
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|ARM.ActiveCfg = Debug|ARM
19+
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|ARM.Build.0 = Debug|ARM
20+
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|ARM.Deploy.0 = Debug|ARM
21+
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|x64.ActiveCfg = Debug|x64
22+
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|x64.Build.0 = Debug|x64
23+
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|x64.Deploy.0 = Debug|x64
24+
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|x86.ActiveCfg = Debug|Win32
25+
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|x86.Build.0 = Debug|Win32
26+
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|x86.Deploy.0 = Debug|Win32
27+
{A2D33437-5635-4832-AD71-08D653A37053}.Release|ARM.ActiveCfg = Release|ARM
28+
{A2D33437-5635-4832-AD71-08D653A37053}.Release|ARM.Build.0 = Release|ARM
29+
{A2D33437-5635-4832-AD71-08D653A37053}.Release|ARM.Deploy.0 = Release|ARM
30+
{A2D33437-5635-4832-AD71-08D653A37053}.Release|x64.ActiveCfg = Release|x64
31+
{A2D33437-5635-4832-AD71-08D653A37053}.Release|x64.Build.0 = Release|x64
32+
{A2D33437-5635-4832-AD71-08D653A37053}.Release|x64.Deploy.0 = Release|x64
33+
{A2D33437-5635-4832-AD71-08D653A37053}.Release|x86.ActiveCfg = Release|Win32
34+
{A2D33437-5635-4832-AD71-08D653A37053}.Release|x86.Build.0 = Release|Win32
35+
{A2D33437-5635-4832-AD71-08D653A37053}.Release|x86.Deploy.0 = Release|Win32
36+
EndGlobalSection
37+
GlobalSection(SolutionProperties) = preSolution
38+
HideSolutionNode = FALSE
39+
EndGlobalSection
40+
GlobalSection(ExtensibilityGlobals) = postSolution
41+
SolutionGuid = {188076BF-8AB0-4B34-82D3-BCDA00EFE46F}
42+
EndGlobalSection
43+
EndGlobal
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.210922.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.210922.5\build\native\Microsoft.Windows.CppWinRT.props')" />
4+
<PropertyGroup>
5+
<SharedContentDir>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), LICENSE))\SharedContent</SharedContentDir>
6+
</PropertyGroup>
7+
<PropertyGroup Label="Globals">
8+
<CppWinRTEnabled>true</CppWinRTEnabled>
9+
<MinimalCoreWin>true</MinimalCoreWin>
10+
<ProjectGuid>{A2D33437-5635-4832-AD71-08D653A37053}</ProjectGuid>
11+
<ProjectName>RadioManager</ProjectName>
12+
<RootNamespace>SDKTemplate</RootNamespace>
13+
<DefaultLanguage>en-US</DefaultLanguage>
14+
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
15+
<AppContainerApplication>true</AppContainerApplication>
16+
<ApplicationType>Windows Store</ApplicationType>
17+
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
18+
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
19+
<WindowsTargetPlatformMinVersion>$(WindowsTargetPlatformVersion)</WindowsTargetPlatformMinVersion>
20+
</PropertyGroup>
21+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
22+
<ItemGroup Label="ProjectConfigurations">
23+
<ProjectConfiguration Include="Debug|ARM">
24+
<Configuration>Debug</Configuration>
25+
<Platform>ARM</Platform>
26+
</ProjectConfiguration>
27+
<ProjectConfiguration Include="Debug|Win32">
28+
<Configuration>Debug</Configuration>
29+
<Platform>Win32</Platform>
30+
</ProjectConfiguration>
31+
<ProjectConfiguration Include="Debug|x64">
32+
<Configuration>Debug</Configuration>
33+
<Platform>x64</Platform>
34+
</ProjectConfiguration>
35+
<ProjectConfiguration Include="Release|ARM">
36+
<Configuration>Release</Configuration>
37+
<Platform>ARM</Platform>
38+
</ProjectConfiguration>
39+
<ProjectConfiguration Include="Release|Win32">
40+
<Configuration>Release</Configuration>
41+
<Platform>Win32</Platform>
42+
</ProjectConfiguration>
43+
<ProjectConfiguration Include="Release|x64">
44+
<Configuration>Release</Configuration>
45+
<Platform>x64</Platform>
46+
</ProjectConfiguration>
47+
</ItemGroup>
48+
<PropertyGroup Label="Configuration">
49+
<ConfigurationType>Application</ConfigurationType>
50+
<CharacterSet>Unicode</CharacterSet>
51+
</PropertyGroup>
52+
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
53+
<UseDebugLibraries>true</UseDebugLibraries>
54+
<LinkIncremental>true</LinkIncremental>
55+
</PropertyGroup>
56+
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
57+
<UseDebugLibraries>false</UseDebugLibraries>
58+
<WholeProgramOptimization>true</WholeProgramOptimization>
59+
<LinkIncremental>false</LinkIncremental>
60+
</PropertyGroup>
61+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
62+
<ImportGroup Label="PropertySheets">
63+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
64+
</ImportGroup>
65+
<PropertyGroup Label="UserMacros" />
66+
<PropertyGroup>
67+
<IncludePath>$(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath);$(SharedContentDir)\cppwinrt</IncludePath>
68+
<CppWinRTOptimized>true</CppWinRTOptimized>
69+
</PropertyGroup>
70+
<ItemDefinitionGroup>
71+
<ClCompile>
72+
<PrecompiledHeader>Use</PrecompiledHeader>
73+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
74+
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
75+
<WarningLevel>Level4</WarningLevel>
76+
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
77+
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
78+
</ClCompile>
79+
</ItemDefinitionGroup>
80+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
81+
<ClCompile>
82+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
83+
</ClCompile>
84+
</ItemDefinitionGroup>
85+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
86+
<ClCompile>
87+
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
88+
</ClCompile>
89+
</ItemDefinitionGroup>
90+
<ItemGroup>
91+
<ClInclude Include="$(SharedContentDir)\cppwinrt\App.h">
92+
<DependentUpon>$(SharedContentDir)\xaml\App.xaml</DependentUpon>
93+
</ClInclude>
94+
<ClInclude Include="$(SharedContentDir)\cppwinrt\MainPage.h">
95+
<DependentUpon>$(SharedContentDir)\xaml\MainPage.xaml</DependentUpon>
96+
</ClInclude>
97+
<ClInclude Include="RadioModel.h" />
98+
<ClInclude Include="SampleConfiguration.h" />
99+
<ClInclude Include="Scenario1_Toggle.h">
100+
<DependentUpon>..\shared\Scenario1_Toggle.xaml</DependentUpon>
101+
</ClInclude>
102+
<ClInclude Include="pch.h" />
103+
</ItemGroup>
104+
<ItemGroup>
105+
<ApplicationDefinition Include="$(SharedContentDir)\xaml\App.xaml">
106+
<SubType>Designer</SubType>
107+
</ApplicationDefinition>
108+
<Page Include="$(SharedContentDir)\xaml\MainPage.xaml">
109+
<SubType>Designer</SubType>
110+
</Page>
111+
<Page Include="..\shared\Scenario1_Toggle.xaml" />
112+
<Page Include="$(SharedContentDir)\xaml\Styles.xaml">
113+
<Link>Styles\Styles.xaml</Link>
114+
</Page>
115+
</ItemGroup>
116+
<ItemGroup>
117+
<ClCompile Include="$(SharedContentDir)\cppwinrt\App.cpp">
118+
<DependentUpon>$(SharedContentDir)\xaml\App.xaml</DependentUpon>
119+
</ClCompile>
120+
<ClCompile Include="$(SharedContentDir)\cppwinrt\MainPage.cpp">
121+
<DependentUpon>$(SharedContentDir)\xaml\MainPage.xaml</DependentUpon>
122+
</ClCompile>
123+
<ClCompile Include="RadioModel.cpp">
124+
<DependentUpon>RadioModel.h</DependentUpon>
125+
</ClCompile>
126+
<ClCompile Include="SampleConfiguration.cpp">
127+
<DependentUpon>SampleConfiguration.h</DependentUpon>
128+
</ClCompile>
129+
<ClCompile Include="Scenario1_Toggle.cpp">
130+
<DependentUpon>..\shared\Scenario1_Toggle.xaml</DependentUpon>
131+
</ClCompile>
132+
<ClCompile Include="pch.cpp">
133+
<PrecompiledHeader>Create</PrecompiledHeader>
134+
<DependentUpon>pch.h</DependentUpon>
135+
</ClCompile>
136+
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp">
137+
<DependentUpon>Project.idl</DependentUpon>
138+
</ClCompile>
139+
</ItemGroup>
140+
<ItemGroup>
141+
<Midl Include="$(SharedContentDir)\cppwinrt\MainPage.idl">
142+
<DependentUpon>$(SharedContentDir)\xaml\MainPage.xaml</DependentUpon>
143+
</Midl>
144+
<Midl Include="Project.idl" />
145+
</ItemGroup>
146+
<ItemGroup>
147+
<AppxManifest Include="Package.appxmanifest">
148+
<SubType>Designer</SubType>
149+
</AppxManifest>
150+
</ItemGroup>
151+
<ItemGroup>
152+
<Image Include="$(SharedContentDir)\media\microsoft-sdk.png">
153+
<Link>Assets\microsoft-sdk.png</Link>
154+
</Image>
155+
<Image Include="$(SharedContentDir)\media\smalltile-sdk.png">
156+
<Link>Assets\smallTile-sdk.png</Link>
157+
</Image>
158+
<Image Include="$(SharedContentDir)\media\splash-sdk.png">
159+
<Link>Assets\splash-sdk.png</Link>
160+
</Image>
161+
<Image Include="$(SharedContentDir)\media\squaretile-sdk.png">
162+
<Link>Assets\squareTile-sdk.png</Link>
163+
</Image>
164+
<Image Include="$(SharedContentDir)\media\storelogo-sdk.png">
165+
<Link>Assets\storeLogo-sdk.png</Link>
166+
</Image>
167+
<Image Include="$(SharedContentDir)\media\tile-sdk.png">
168+
<Link>Assets\tile-sdk.png</Link>
169+
</Image>
170+
<Image Include="$(SharedContentDir)\media\windows-sdk.png">
171+
<Link>Assets\windows-sdk.png</Link>
172+
</Image>
173+
</ItemGroup>
174+
<ItemGroup>
175+
<None Include="packages.config" />
176+
</ItemGroup>
177+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
178+
<ImportGroup Label="ExtensionTargets">
179+
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.210922.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.210922.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
180+
</ImportGroup>
181+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
182+
<PropertyGroup>
183+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
184+
</PropertyGroup>
185+
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.210922.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.210922.5\build\native\Microsoft.Windows.CppWinRT.props'))" />
186+
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.210922.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.210922.5\build\native\Microsoft.Windows.CppWinRT.targets'))" />
187+
</Target>
188+
</Project>

0 commit comments

Comments
 (0)