-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows 10 Version 2004 - September 2021 Samples Update 2
* New C++/WinRT sample: RadioManager
- Loading branch information
1 parent
29d2965
commit f7bec16
Showing
34 changed files
with
752 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<Package | ||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" | ||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" | ||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" | ||
IgnorableNamespaces="uap mp" | ||
> | ||
<Identity Name="Microsoft.SDKSamples.RadioManager.CPP" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.0.0.0"/> | ||
<mp:PhoneIdentity PhoneProductId="8d84de98-980c-4bae-8062-bc504d0718c3" PhonePublisherId="00000000-0000-0000-0000-000000000000"/> | ||
<Properties> | ||
<DisplayName>RadioManager C++/WinRT Sample</DisplayName> | ||
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName> | ||
<Logo>Assets\storelogo-sdk.png</Logo> | ||
</Properties> | ||
<Dependencies> | ||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.17763.0"/> | ||
</Dependencies> | ||
<Resources> | ||
<Resource Language="x-generate"/> | ||
</Resources> | ||
<Applications> | ||
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="App"> | ||
<uap:VisualElements | ||
DisplayName="RadioManager C++/WinRT Sample" | ||
Square150x150Logo="Assets\squareTile-sdk.png" | ||
Square44x44Logo="Assets\smallTile-sdk.png" | ||
Description="RadioManager C++/WinRT Sample" | ||
BackgroundColor="#00B2F0" | ||
> | ||
<uap:SplashScreen Image="Assets\splash-sdk.png"/> | ||
<uap:DefaultTile> | ||
<uap:ShowNameOnTiles> | ||
<uap:ShowOn Tile="square150x150Logo"/> | ||
</uap:ShowNameOnTiles> | ||
</uap:DefaultTile> | ||
</uap:VisualElements> | ||
</Application> | ||
</Applications> | ||
<Capabilities> | ||
<DeviceCapability Name="radios" /> | ||
</Capabilities> | ||
</Package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//********************************************************* | ||
// | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// This code is licensed under the MIT License (MIT). | ||
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF | ||
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY | ||
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR | ||
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. | ||
// | ||
//********************************************************* | ||
|
||
namespace SDKTemplate | ||
{ | ||
[default_interface] | ||
runtimeclass Scenario1_Toggle : Windows.UI.Xaml.Controls.Page | ||
{ | ||
Scenario1_Toggle(); | ||
} | ||
|
||
[Windows.UI.Xaml.Data.Bindable] | ||
runtimeclass RadioModel : Windows.UI.Xaml.Data.INotifyPropertyChanged | ||
{ | ||
String Name { get; }; | ||
Boolean IsEnabled{ get; }; | ||
Boolean IsRadioOn; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.31702.278 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RadioManager", "RadioManager.vcxproj", "{A2D33437-5635-4832-AD71-08D653A37053}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|ARM = Debug|ARM | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|ARM = Release|ARM | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|ARM.ActiveCfg = Debug|ARM | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|ARM.Build.0 = Debug|ARM | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|ARM.Deploy.0 = Debug|ARM | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|x64.ActiveCfg = Debug|x64 | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|x64.Build.0 = Debug|x64 | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|x64.Deploy.0 = Debug|x64 | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|x86.ActiveCfg = Debug|Win32 | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|x86.Build.0 = Debug|Win32 | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Debug|x86.Deploy.0 = Debug|Win32 | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Release|ARM.ActiveCfg = Release|ARM | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Release|ARM.Build.0 = Release|ARM | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Release|ARM.Deploy.0 = Release|ARM | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Release|x64.ActiveCfg = Release|x64 | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Release|x64.Build.0 = Release|x64 | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Release|x64.Deploy.0 = Release|x64 | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Release|x86.ActiveCfg = Release|Win32 | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Release|x86.Build.0 = Release|Win32 | ||
{A2D33437-5635-4832-AD71-08D653A37053}.Release|x86.Deploy.0 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {188076BF-8AB0-4B34-82D3-BCDA00EFE46F} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<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')" /> | ||
<PropertyGroup> | ||
<SharedContentDir>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), LICENSE))\SharedContent</SharedContentDir> | ||
</PropertyGroup> | ||
<PropertyGroup Label="Globals"> | ||
<CppWinRTEnabled>true</CppWinRTEnabled> | ||
<MinimalCoreWin>true</MinimalCoreWin> | ||
<ProjectGuid>{A2D33437-5635-4832-AD71-08D653A37053}</ProjectGuid> | ||
<ProjectName>RadioManager</ProjectName> | ||
<RootNamespace>SDKTemplate</RootNamespace> | ||
<DefaultLanguage>en-US</DefaultLanguage> | ||
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion> | ||
<AppContainerApplication>true</AppContainerApplication> | ||
<ApplicationType>Windows Store</ApplicationType> | ||
<ApplicationTypeRevision>10.0</ApplicationTypeRevision> | ||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion> | ||
<WindowsTargetPlatformMinVersion>$(WindowsTargetPlatformVersion)</WindowsTargetPlatformMinVersion> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="Debug|ARM"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>ARM</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|Win32"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|x64"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|ARM"> | ||
<Configuration>Release</Configuration> | ||
<Platform>ARM</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|Win32"> | ||
<Configuration>Release</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|x64"> | ||
<Configuration>Release</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<PropertyGroup Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<CharacterSet>Unicode</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> | ||
<UseDebugLibraries>true</UseDebugLibraries> | ||
<LinkIncremental>true</LinkIncremental> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
<LinkIncremental>false</LinkIncremental> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
<ImportGroup Label="PropertySheets"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<PropertyGroup Label="UserMacros" /> | ||
<PropertyGroup> | ||
<IncludePath>$(VC_IncludePath);$(UniversalCRT_IncludePath);$(WindowsSDK_IncludePath);$(SharedContentDir)\cppwinrt</IncludePath> | ||
<CppWinRTOptimized>true</CppWinRTOptimized> | ||
</PropertyGroup> | ||
<ItemDefinitionGroup> | ||
<ClCompile> | ||
<PrecompiledHeader>Use</PrecompiledHeader> | ||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> | ||
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> | ||
<WarningLevel>Level4</WarningLevel> | ||
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions> | ||
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings> | ||
</ClCompile> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'"> | ||
<ClCompile> | ||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
</ClCompile> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'"> | ||
<ClCompile> | ||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
</ClCompile> | ||
</ItemDefinitionGroup> | ||
<ItemGroup> | ||
<ClInclude Include="$(SharedContentDir)\cppwinrt\App.h"> | ||
<DependentUpon>$(SharedContentDir)\xaml\App.xaml</DependentUpon> | ||
</ClInclude> | ||
<ClInclude Include="$(SharedContentDir)\cppwinrt\MainPage.h"> | ||
<DependentUpon>$(SharedContentDir)\xaml\MainPage.xaml</DependentUpon> | ||
</ClInclude> | ||
<ClInclude Include="RadioModel.h" /> | ||
<ClInclude Include="SampleConfiguration.h" /> | ||
<ClInclude Include="Scenario1_Toggle.h"> | ||
<DependentUpon>..\shared\Scenario1_Toggle.xaml</DependentUpon> | ||
</ClInclude> | ||
<ClInclude Include="pch.h" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ApplicationDefinition Include="$(SharedContentDir)\xaml\App.xaml"> | ||
<SubType>Designer</SubType> | ||
</ApplicationDefinition> | ||
<Page Include="$(SharedContentDir)\xaml\MainPage.xaml"> | ||
<SubType>Designer</SubType> | ||
</Page> | ||
<Page Include="..\shared\Scenario1_Toggle.xaml" /> | ||
<Page Include="$(SharedContentDir)\xaml\Styles.xaml"> | ||
<Link>Styles\Styles.xaml</Link> | ||
</Page> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="$(SharedContentDir)\cppwinrt\App.cpp"> | ||
<DependentUpon>$(SharedContentDir)\xaml\App.xaml</DependentUpon> | ||
</ClCompile> | ||
<ClCompile Include="$(SharedContentDir)\cppwinrt\MainPage.cpp"> | ||
<DependentUpon>$(SharedContentDir)\xaml\MainPage.xaml</DependentUpon> | ||
</ClCompile> | ||
<ClCompile Include="RadioModel.cpp"> | ||
<DependentUpon>RadioModel.h</DependentUpon> | ||
</ClCompile> | ||
<ClCompile Include="SampleConfiguration.cpp"> | ||
<DependentUpon>SampleConfiguration.h</DependentUpon> | ||
</ClCompile> | ||
<ClCompile Include="Scenario1_Toggle.cpp"> | ||
<DependentUpon>..\shared\Scenario1_Toggle.xaml</DependentUpon> | ||
</ClCompile> | ||
<ClCompile Include="pch.cpp"> | ||
<PrecompiledHeader>Create</PrecompiledHeader> | ||
<DependentUpon>pch.h</DependentUpon> | ||
</ClCompile> | ||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp"> | ||
<DependentUpon>Project.idl</DependentUpon> | ||
</ClCompile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Midl Include="$(SharedContentDir)\cppwinrt\MainPage.idl"> | ||
<DependentUpon>$(SharedContentDir)\xaml\MainPage.xaml</DependentUpon> | ||
</Midl> | ||
<Midl Include="Project.idl" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<AppxManifest Include="Package.appxmanifest"> | ||
<SubType>Designer</SubType> | ||
</AppxManifest> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Image Include="$(SharedContentDir)\media\microsoft-sdk.png"> | ||
<Link>Assets\microsoft-sdk.png</Link> | ||
</Image> | ||
<Image Include="$(SharedContentDir)\media\smalltile-sdk.png"> | ||
<Link>Assets\smallTile-sdk.png</Link> | ||
</Image> | ||
<Image Include="$(SharedContentDir)\media\splash-sdk.png"> | ||
<Link>Assets\splash-sdk.png</Link> | ||
</Image> | ||
<Image Include="$(SharedContentDir)\media\squaretile-sdk.png"> | ||
<Link>Assets\squareTile-sdk.png</Link> | ||
</Image> | ||
<Image Include="$(SharedContentDir)\media\storelogo-sdk.png"> | ||
<Link>Assets\storeLogo-sdk.png</Link> | ||
</Image> | ||
<Image Include="$(SharedContentDir)\media\tile-sdk.png"> | ||
<Link>Assets\tile-sdk.png</Link> | ||
</Image> | ||
<Image Include="$(SharedContentDir)\media\windows-sdk.png"> | ||
<Link>Assets\windows-sdk.png</Link> | ||
</Image> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
<ImportGroup Label="ExtensionTargets"> | ||
<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')" /> | ||
</ImportGroup> | ||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
<PropertyGroup> | ||
<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> | ||
</PropertyGroup> | ||
<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'))" /> | ||
<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'))" /> | ||
</Target> | ||
</Project> |
60 changes: 60 additions & 0 deletions
60
Samples/RadioManager/cppwinrt/RadioManager.vcxproj.filters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<Filter Include="Assets"> | ||
<UniqueIdentifier>4416d50a-7676-4d0a-9b2c-91ff70c6047f</UniqueIdentifier> | ||
<Extensions>bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png</Extensions> | ||
</Filter> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Page Include="..\shared\Scenario1_Toggle.xaml" /> | ||
<Page Include="$(SharedContentDir)\xaml\MainPage.xaml" /> | ||
<Page Include="$(SharedContentDir)\xaml\Styles.xaml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Midl Include="Project.idl" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="pch.cpp" /> | ||
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" /> | ||
<ClCompile Include="RadioModel.cpp" /> | ||
<ClCompile Include="SampleConfiguration.cpp" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="pch.h" /> | ||
<ClInclude Include="SampleConfiguration.h" /> | ||
<ClInclude Include="RadioModel.h" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<AppxManifest Include="Package.appxmanifest" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Image Include="$(SharedContentDir)\media\microsoft-sdk.png"> | ||
<Filter>Assets</Filter> | ||
</Image> | ||
<Image Include="$(SharedContentDir)\media\smalltile-sdk.png"> | ||
<Filter>Assets</Filter> | ||
</Image> | ||
<Image Include="$(SharedContentDir)\media\splash-sdk.png"> | ||
<Filter>Assets</Filter> | ||
</Image> | ||
<Image Include="$(SharedContentDir)\media\squaretile-sdk.png"> | ||
<Filter>Assets</Filter> | ||
</Image> | ||
<Image Include="$(SharedContentDir)\media\storelogo-sdk.png"> | ||
<Filter>Assets</Filter> | ||
</Image> | ||
<Image Include="$(SharedContentDir)\media\tile-sdk.png"> | ||
<Filter>Assets</Filter> | ||
</Image> | ||
<Image Include="$(SharedContentDir)\media\windows-sdk.png"> | ||
<Filter>Assets</Filter> | ||
</Image> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ApplicationDefinition Include="$(SharedContentDir)\xaml\App.xaml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.