Windows 10 Version 1709 - February 2018 Update

This commit is contained in:
Raymond Chen 2018-02-07 17:00:04 -08:00
Родитель e9247157df
Коммит c2ca5ee404
281 изменённых файлов: 414 добавлений и 216 удалений

Просмотреть файл

@ -11,7 +11,7 @@
<Properties>
<DisplayName>360 Video Playback C++ Sample</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
<Logo>Assets\StoreLogo-sdk.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.15063.0" MaxVersionTested="10.0.16299.0"/>

Просмотреть файл

@ -66,12 +66,12 @@ namespace _360VideoPlayback.Common
// Initialize Direct2D resources.
var debugLevel = SharpDX.Direct2D1.DebugLevel.None;
//#if DEBUG
#if DEBUG
if (DirectXHelper.SdkLayersAvailable())
{
debugLevel = SharpDX.Direct2D1.DebugLevel.Information;
}
//#endif
#endif
// Initialize the Direct2D Factory.
d2dFactory = this.ToDispose(

Просмотреть файл

@ -11,7 +11,7 @@
<Properties>
<DisplayName>360 Video Playback C# Sample</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
<Logo>Assets\StoreLogo-sdk.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.15063.0" MaxVersionTested="10.0.16299.0"/>

Просмотреть файл

@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
@ -39,5 +38,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -46,4 +46,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -13,6 +13,7 @@ using System;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using Windows.ApplicationModel;
using Windows.Devices.Enumeration;
@ -63,6 +64,7 @@ namespace CameraGetPreviewFrame
private MediaCapture _mediaCapture;
private bool _isInitialized = false;
private bool _isPreviewing = false;
private static readonly SemaphoreSlim _mediaCaptureLifeLock = new SemaphoreSlim(1);
// Information about the camera device
private bool _mirroringPreview = false;
@ -93,7 +95,7 @@ namespace CameraGetPreviewFrame
await CleanupCameraAsync();
_displayInformation.OrientationChanged -= DisplayInformation_OrientationChanged;
deferral.Complete();
}
}
@ -213,6 +215,8 @@ namespace CameraGetPreviewFrame
{
Debug.WriteLine("InitializeCameraAsync");
await _mediaCaptureLifeLock.WaitAsync();
if (_mediaCapture == null)
{
// Attempt to get the back camera if one is available, but use any camera device if not
@ -221,6 +225,7 @@ namespace CameraGetPreviewFrame
if (cameraDevice == null)
{
Debug.WriteLine("No camera device found!");
_mediaCaptureLifeLock.Release();
return;
}
@ -242,6 +247,10 @@ namespace CameraGetPreviewFrame
{
Debug.WriteLine("The app was denied access to the camera");
}
finally
{
_mediaCaptureLifeLock.Release();
}
// If initialization succeeded, start the preview
if (_isInitialized)
@ -260,7 +269,7 @@ namespace CameraGetPreviewFrame
// Only mirror the preview if the camera is on the front panel
_mirroringPreview = (cameraDevice.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Front);
}
await StartPreviewAsync();
var picturesLibrary = await StorageLibrary.GetLibraryAsync(KnownLibraryId.Pictures);
@ -268,6 +277,10 @@ namespace CameraGetPreviewFrame
_captureFolder = picturesLibrary.SaveFolder ?? ApplicationData.Current.LocalFolder;
}
}
else
{
_mediaCaptureLifeLock.Release();
}
}
/// <summary>
@ -436,24 +449,33 @@ namespace CameraGetPreviewFrame
/// <returns></returns>
private async Task CleanupCameraAsync()
{
if (_isInitialized)
await _mediaCaptureLifeLock.WaitAsync();
try
{
if (_isPreviewing)
if (_isInitialized)
{
// The call to stop the preview is included here for completeness, but can be
// safely removed if a call to MediaCapture.Dispose() is being made later,
// as the preview will be automatically stopped at that point
await StopPreviewAsync();
if (_isPreviewing)
{
// The call to stop the preview is included here for completeness, but can be
// safely removed if a call to MediaCapture.Dispose() is being made later,
// as the preview will be automatically stopped at that point
await StopPreviewAsync();
}
_isInitialized = false;
}
_isInitialized = false;
if (_mediaCapture != null)
{
_mediaCapture.Failed -= MediaCapture_Failed;
_mediaCapture.Dispose();
_mediaCapture = null;
}
}
if (_mediaCapture != null)
finally
{
_mediaCapture.Failed -= MediaCapture_Failed;
_mediaCapture.Dispose();
_mediaCapture = null;
_mediaCaptureLifeLock.Release();
}
}

Просмотреть файл

@ -13,7 +13,13 @@
#include "MainPage.xaml.h"
#include "SampleConfiguration.h"
using namespace Concurrency;
using namespace SDKTemplate;
using namespace Windows::Devices;
using namespace Windows::Devices::Enumeration;
using namespace Windows::Media::Capture;
using namespace Windows::Media::MediaProperties;
using namespace Windows::UI::Xaml::Controls;
Platform::Array<Scenario>^ MainPage::scenariosInner = ref new Platform::Array<Scenario>
{
@ -21,3 +27,23 @@ Platform::Array<Scenario>^ MainPage::scenariosInner = ref new Platform::Array<Sc
{ "Change preview and photo settings", "SDKTemplate.Scenario2_PhotoSettings" },
{ "Match aspect ratios", "SDKTemplate.Scenario3_AspectRatio" }
};
/// <summary>
/// Sets encoding properties on a camera stream. Ensures CaptureElement and preview stream are stopped before setting properties.
/// </summary>
task<void> MainPage::SetMediaStreamPropertiesAsync(MediaCapture^ mediaCapture, CaptureElement^ previewControl, MediaStreamType streamType, IMediaEncodingProperties^ encodingProperties)
{
// Stop preview and unlink the CaptureElement from the MediaCapture object
return create_task(mediaCapture->StopPreviewAsync())
.then([this, mediaCapture, previewControl, streamType, encodingProperties]()
{
previewControl->Source = nullptr;
// Apply desired stream properties
return create_task(mediaCapture->VideoDeviceController->SetMediaStreamPropertiesAsync(streamType, encodingProperties));
}).then([this, mediaCapture, previewControl]() {
// Recreate the CaptureElement pipeline and restart the preview
previewControl->Source = mediaCapture;
return create_task(mediaCapture->StartPreviewAsync());
});
}

Просмотреть файл

@ -35,6 +35,8 @@ namespace SDKTemplate
}
}
Concurrency::task<void> SetMediaStreamPropertiesAsync(Windows::Media::Capture::MediaCapture^ mediaCapture, Windows::UI::Xaml::Controls::CaptureElement^ previewControl, Windows::Media::Capture::MediaStreamType streamType, Windows::Media::MediaProperties::IMediaEncodingProperties ^ encodingProperties);
private:
static Platform::Array<Scenario>^ scenariosInner;
};

Просмотреть файл

@ -142,7 +142,7 @@ void Scenario1_PreviewSettings::ComboBoxSettings_Changed(Platform::Object^ sende
{
auto selectedItem = static_cast<ComboBoxItem^>(static_cast<ComboBox^>(sender)->SelectedItem);
auto encodingProperties = static_cast<IMediaEncodingProperties^>(selectedItem->Tag);
create_task(_mediaCapture->VideoDeviceController->SetMediaStreamPropertiesAsync(MediaStreamType::VideoPreview, encodingProperties));
create_task(_rootPage->SetMediaStreamPropertiesAsync(_mediaCapture.Get(), PreviewControl, MediaStreamType::VideoPreview, encodingProperties));
}
}

Просмотреть файл

@ -192,7 +192,7 @@ void Scenario2_PhotoSettings::PreviewSettings_Changed(Platform::Object^ sender,
{
auto selectedItem = static_cast<ComboBoxItem^>(static_cast<ComboBox^>(sender)->SelectedItem);
auto encodingProperties = static_cast<IMediaEncodingProperties^>(selectedItem->Tag);
create_task(_mediaCapture->VideoDeviceController->SetMediaStreamPropertiesAsync(MediaStreamType::VideoPreview, encodingProperties));
create_task(_rootPage->SetMediaStreamPropertiesAsync(_mediaCapture.Get(), PreviewControl, MediaStreamType::VideoPreview, encodingProperties));
}
}
@ -206,7 +206,7 @@ void Scenario2_PhotoSettings::PhotoSettings_Changed(Platform::Object^ sender, Wi
{
auto selectedItem = static_cast<ComboBoxItem^>(static_cast<ComboBox^>(sender)->SelectedItem);
auto encodingProperties = static_cast<IMediaEncodingProperties^>(selectedItem->Tag);
create_task(_mediaCapture->VideoDeviceController->SetMediaStreamPropertiesAsync(MediaStreamType::Photo, encodingProperties));
create_task(_rootPage->SetMediaStreamPropertiesAsync(_mediaCapture.Get(), PreviewControl, MediaStreamType::Photo, encodingProperties));
}
}

Просмотреть файл

@ -210,7 +210,7 @@ void Scenario3_AspectRatio::PreviewSettings_Changed(Platform::Object^ sender, Wi
{
auto selectedItem = static_cast<ComboBoxItem^>(static_cast<ComboBox^>(sender)->SelectedItem);
auto encodingProperties = static_cast<IMediaEncodingProperties^>(selectedItem->Tag);
create_task(_mediaCapture->VideoDeviceController->SetMediaStreamPropertiesAsync(MediaStreamType::VideoPreview, encodingProperties));
create_task(_rootPage->SetMediaStreamPropertiesAsync(_mediaCapture.Get(), PreviewControl, MediaStreamType::VideoPreview, encodingProperties));
// The preview just changed, update the video combo box
MatchPreviewAspectRatio();
@ -227,7 +227,7 @@ void Scenario3_AspectRatio::VideoSettings_Changed(Platform::Object^ sender, Wind
{
auto selectedItem = static_cast<ComboBoxItem^>(static_cast<ComboBox^>(sender)->SelectedItem);
auto encodingProperties = static_cast<IMediaEncodingProperties^>(selectedItem->Tag);
create_task(_mediaCapture->VideoDeviceController->SetMediaStreamPropertiesAsync(MediaStreamType::VideoRecord, encodingProperties));
create_task(_rootPage->SetMediaStreamPropertiesAsync(_mediaCapture.Get(), PreviewControl, MediaStreamType::VideoRecord, encodingProperties));
}
}

Просмотреть файл

@ -14,6 +14,7 @@ using System.Collections.Generic;
using Windows.UI.Xaml.Controls;
using Windows.Media.Capture;
using Windows.UI.Core;
using Windows.Media.MediaProperties;
namespace SDKTemplate
{
@ -50,6 +51,22 @@ namespace SDKTemplate
public bool IsRecording { get; set; }
public MediaCapture MediaCapture { get; private set; }
/// <summary>
/// Sets encoding properties on a camera stream. Ensures CaptureElement and preview stream are stopped before setting properties.
/// </summary>
public async Task SetMediaStreamPropertiesAsync(MediaStreamType streamType, IMediaEncodingProperties encodingProperties)
{
// Stop preview and unlink the CaptureElement from the MediaCapture object
await MediaCapture.StopPreviewAsync();
_previewControl.Source = null;
// Apply desired stream properties
await MediaCapture.VideoDeviceController.SetMediaStreamPropertiesAsync(MediaStreamType.VideoPreview, encodingProperties);
// Recreate the CaptureElement pipeline and restart the preview
_previewControl.Source = MediaCapture;
await MediaCapture.StartPreviewAsync();
}
/// <summary>
/// Initializes the MediaCapture, starts preview.

Просмотреть файл

@ -79,7 +79,7 @@ namespace SDKTemplate
{
var selectedItem = (sender as ComboBox).SelectedItem as ComboBoxItem;
var encodingProperties = (selectedItem.Tag as StreamResolution).EncodingProperties;
await _previewer.MediaCapture.VideoDeviceController.SetMediaStreamPropertiesAsync(MediaStreamType.VideoPreview, encodingProperties);
await _previewer.SetMediaStreamPropertiesAsync(MediaStreamType.VideoPreview, encodingProperties);
}
}

Просмотреть файл

@ -107,7 +107,7 @@ namespace SDKTemplate
{
var selectedItem = (sender as ComboBox).SelectedItem as ComboBoxItem;
var encodingProperties = (selectedItem.Tag as StreamResolution).EncodingProperties;
await _previewer.MediaCapture.VideoDeviceController.SetMediaStreamPropertiesAsync(MediaStreamType.VideoPreview, encodingProperties);
await _previewer.SetMediaStreamPropertiesAsync(MediaStreamType.VideoPreview, encodingProperties);
}
}

Просмотреть файл

@ -111,7 +111,7 @@ namespace SDKTemplate
{
var selectedItem = (sender as ComboBox).SelectedItem as ComboBoxItem;
var encodingProperties = (selectedItem.Tag as StreamResolution).EncodingProperties;
await _previewer.MediaCapture.VideoDeviceController.SetMediaStreamPropertiesAsync(MediaStreamType.VideoPreview, encodingProperties);
await _previewer.SetMediaStreamPropertiesAsync(MediaStreamType.VideoPreview, encodingProperties);
// The preview just changed, update the video combo box
MatchPreviewAspectRatio();

Просмотреть файл

@ -84,7 +84,7 @@
if (cameraSettings.value == "")
return;
mediaCapture.videoDeviceController.setMediaStreamPropertiesAsync(Capture.MediaStreamType.videoPreview, allProperties[cameraSettings.value]);
setMediaStreamPropertiesAsync(mediaCapture, Capture.MediaStreamType.videoPreview, allProperties[cameraSettings.value]);
}
}

Просмотреть файл

@ -101,7 +101,7 @@
if (previewSettings.value == "")
return;
mediaCapture.videoDeviceController.setMediaStreamPropertiesAsync(Capture.MediaStreamType.videoPreview, previewProperties[previewSettings.value]);
setMediaStreamPropertiesAsync(mediaCapture, Capture.MediaStreamType.videoPreview, previewProperties[previewSettings.value]);
}
}
@ -114,7 +114,7 @@
if (photoSettings.value == "")
return;
mediaCapture.videoDeviceController.setMediaStreamPropertiesAsync(Capture.MediaStreamType.videoPreview, photoProperties[photoSettings.value]);
setMediaStreamPropertiesAsync(mediaCapture, Capture.MediaStreamType.videoPreview, photoProperties[photoSettings.value]);
}
}

Просмотреть файл

@ -113,7 +113,7 @@
if (previewSettings.value == "")
return;
console.log(previewSettings.value)
mediaCapture.videoDeviceController.setMediaStreamPropertiesAsync(Capture.MediaStreamType.videoPreview, previewProperties[previewSettings.value]);
setMediaStreamPropertiesAsync(mediaCapture, Capture.MediaStreamType.videoPreview, previewProperties[previewSettings.value]);
// The preview just changed, update the video combo box
MatchPreviewAspectRatio();
@ -128,7 +128,7 @@
// The first element is just text
if (videoSettings.value == "")
return;
mediaCapture.videoDeviceController.setMediaStreamPropertiesAsync(Capture.MediaStreamType.videoRecord, videoProperties[videoSettings.value]);
setMediaStreamPropertiesAsync(mediaCapture, Capture.MediaStreamType.videoRecord, videoProperties[videoSettings.value]);
}
}

Просмотреть файл

@ -61,3 +61,23 @@ streamResolutionHelper.prototype.frameRate = function () {
streamResolutionHelper.prototype.aspectRatio = function () {
return (this.width() / this.height()).toFixed(2);
}
/// <summary>
/// Sets encoding properties on a camera stream. Ensures VideoElement and preview stream are stopped before setting properties.
/// </summary>
function setMediaStreamPropertiesAsync(mediaCapture, streamType, encodingProperties) {
// Stop preview and unlink the VideoElement from the MediaCapture object
var previewVidTag = document.getElementById("cameraPreview");
previewVidTag.pause;
previewVidTag.src = null;
// Apply desired stream properties
return mediaCapture.videoDeviceController.setMediaStreamPropertiesAsync(streamType, encodingProperties)
.then(function () {
// Recreate pipeline and restart the preview
var previewVidTag = document.getElementById("cameraPreview");
var previewUrl = URL.createObjectURL(mediaCapture);
previewVidTag.src = previewUrl;
previewVidTag.play();
});
}

Просмотреть файл

@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
@ -39,5 +38,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -12,7 +12,7 @@
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>15</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
<FileAlignment>512</FileAlignment>

Просмотреть файл

@ -21,7 +21,7 @@
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.15063.0" MaxVersionTested="10.0.15063.0" />
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.15063.0" MaxVersionTested="10.0.16299.0" />
</Dependencies>
<Resources>

Просмотреть файл

@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
@ -39,5 +38,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
@ -39,5 +38,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
@ -39,5 +38,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
@ -39,5 +38,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
@ -53,5 +52,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -52,5 +52,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -15,8 +15,12 @@ using namespace Windows::Graphics::Holographic;
static const std::wstring s_VertexShaderFiles[DX::VertexShader_Max] =
{
L"ms-appx:///VertexShader.cso",
L"ms-appx:///VprtVertexShader.cso",
L"ms-appx:///VertexShaderTexture.cso",
};
static const std::wstring s_VprtVertexShaderFiles[DX::VertexShader_Max] =
{
L"ms-appx:///VprtVertexShader.cso",
L"ms-appx:///VprtVertexShaderTexture.cso"
};
@ -393,7 +397,7 @@ Concurrency::task<void> DX::DeviceResources::LoadShaders()
// Load vertex shaders and input layouts
for (int i = 0; i < VertexShader_Max; i++)
{
Concurrency::task<std::vector<byte>> loadVSTask = DX::ReadDataAsync(s_VertexShaderFiles[i]);
Concurrency::task<std::vector<byte>> loadVSTask = DX::ReadDataAsync(m_supportsVprt ? s_VprtVertexShaderFiles[i] : s_VertexShaderFiles[i]);
Concurrency::task<void> createVSTask = loadVSTask.then([this, i](const std::vector<byte>& fileData)
{
@ -407,7 +411,6 @@ Concurrency::task<void> DX::DeviceResources::LoadShaders()
switch (i)
{
case VertexShader_Simple:
case VertexShader_VPRT:
{
const D3D11_INPUT_ELEMENT_DESC vertexDesc[] =
{
@ -425,7 +428,6 @@ Concurrency::task<void> DX::DeviceResources::LoadShaders()
}
break;
case VertexShader_Texture:
case VertexShader_TextureVPRT:
{
const D3D11_INPUT_ELEMENT_DESC vertexDesc[] =
{

Просмотреть файл

@ -9,9 +9,7 @@ namespace DX
typedef enum
{
VertexShader_Simple = 0,
VertexShader_VPRT,
VertexShader_Texture,
VertexShader_TextureVPRT,
VertexShader_Max
} VertexShaderIndex;

Просмотреть файл

@ -220,8 +220,8 @@ void Button::DoCreateDeviceDependentResources()
// target array index, thus avoiding any overhead that would be
// incurred by setting the geometry shader stage.
m_vertexShader = m_deviceResources->GetVertexShader(m_usingVprtShaders ? DX::VertexShader_TextureVPRT : DX::VertexShader_Texture);
m_inputLayout = m_deviceResources->GetInputLayout(m_usingVprtShaders ? DX::VertexShader_TextureVPRT : DX::VertexShader_Texture);
m_vertexShader = m_deviceResources->GetVertexShader(DX::VertexShader_Texture);
m_inputLayout = m_deviceResources->GetInputLayout(DX::VertexShader_Texture);
m_pixelShader = m_deviceResources->GetPixelShader(DX::PixelShader_Texture);
D3D11_TEXTURE2D_DESC texDesc;

Просмотреть файл

@ -154,8 +154,8 @@ void Cursor::CreateDeviceDependentResources()
// target array index, thus avoiding any overhead that would be
// incurred by setting the geometry shader stage.
m_vertexShader = m_deviceResources->GetVertexShader(m_usingVprtShaders ? DX::VertexShader_TextureVPRT : DX::VertexShader_Texture);
m_inputLayout = m_deviceResources->GetInputLayout(m_usingVprtShaders ? DX::VertexShader_TextureVPRT : DX::VertexShader_Texture);
m_vertexShader = m_deviceResources->GetVertexShader(DX::VertexShader_Texture);
m_inputLayout = m_deviceResources->GetInputLayout(DX::VertexShader_Texture);
m_pixelShader = m_deviceResources->GetPixelShader(DX::PixelShader_Cursor);
D3D11_TEXTURE2D_DESC texDesc;

Просмотреть файл

@ -145,8 +145,8 @@ void Panel::DoCreateDeviceDependentResources()
// target array index, thus avoiding any overhead that would be
// incurred by setting the geometry shader stage.
m_vertexShader = m_deviceResources->GetVertexShader(m_usingVprtShaders ? DX::VertexShader_VPRT : DX::VertexShader_Simple);
m_inputLayout = m_deviceResources->GetInputLayout(m_usingVprtShaders ? DX::VertexShader_VPRT : DX::VertexShader_Simple);
m_vertexShader = m_deviceResources->GetVertexShader(DX::VertexShader_Simple);
m_inputLayout = m_deviceResources->GetInputLayout(DX::VertexShader_Simple);
m_pixelShader = m_deviceResources->GetPixelShader(DX::PixelShader_Simple);
if (!m_usingVprtShaders)

Просмотреть файл

@ -166,8 +166,8 @@ void SpinningCubeRenderer::CreateDeviceDependentResources()
// target array index, thus avoiding any overhead that would be
// incurred by setting the geometry shader stage.
m_vertexShader = m_deviceResources->GetVertexShader(m_usingVprtShaders ? DX::VertexShader_VPRT : DX::VertexShader_Simple);
m_inputLayout = m_deviceResources->GetInputLayout(m_usingVprtShaders ? DX::VertexShader_VPRT : DX::VertexShader_Simple);
m_vertexShader = m_deviceResources->GetVertexShader(DX::VertexShader_Simple);
m_inputLayout = m_deviceResources->GetInputLayout(DX::VertexShader_Simple);
m_pixelShader = m_deviceResources->GetPixelShader(DX::PixelShader_Simple);
if (!m_usingVprtShaders)

Просмотреть файл

@ -517,8 +517,8 @@ void HolographicMRCSampleMain::OnButtonInitTapped()
{
Concurrency::create_task(m_mediaCapture->InitializeAsync()).then([this]()
{
m_photoButton->SetEnabled(true);
m_videoButton->SetEnabled(true);
m_photoButton->SetEnabled(m_mediaCapture->CanTakePhoto());
m_videoButton->SetEnabled(m_mediaCapture->CanToggleVideo());
m_hologramButton->SetEnabled(true);
m_sysAudioButton->SetEnabled(true);
});
@ -544,7 +544,7 @@ void HolographicMRCSampleMain::OnButtonVideoTapped()
m_initButton->SetEnabled(false);
m_photoButton->SetEnabled(m_mediaCapture->CanTakePhoto());
m_videoButton->SetEnabled(true);
m_videoButton->SetEnabled(m_mediaCapture->CanToggleVideo());
m_hologramButton->SetEnabled(true);
m_sysAudioButton->SetEnabled(true);
});
@ -565,7 +565,7 @@ void HolographicMRCSampleMain::OnButtonVideoTapped()
m_initButton->SetEnabled(false);
m_photoButton->SetEnabled(m_mediaCapture->CanTakePhoto());
m_videoButton->SetEnabled(true);
m_videoButton->SetEnabled(m_mediaCapture->CanToggleVideo());
m_hologramButton->SetEnabled(false);
m_sysAudioButton->SetEnabled(false);
});
@ -587,7 +587,7 @@ void HolographicMRCSampleMain::OnButtonPhotoTapped()
{
m_initButton->SetEnabled(false);
m_photoButton->SetEnabled(m_mediaCapture->CanTakePhoto());
m_videoButton->SetEnabled(true);
m_videoButton->SetEnabled(m_mediaCapture->CanToggleVideo());
m_hologramButton->SetEnabled(true);
m_sysAudioButton->SetEnabled(true);
});

Просмотреть файл

@ -49,7 +49,16 @@ Concurrency::task<void> MediaCaptureManager::InitializeAsync(IMFDXGIDeviceManage
return Concurrency::create_task(m_mediaCapture->InitializeAsync(initSetting)).then([this]()
{
auto lock = m_lock.LockExclusive();
m_currentState = Initialized;
if (m_mediaCapture->MediaCaptureSettings->AudioDeviceId && m_mediaCapture->MediaCaptureSettings->VideoDeviceId)
{
// MediaCapture is initialized with valid audio and video device.
m_currentState = Initialized;
}
else
{
OutputDebugString(L"MediaCapture is initialized without valid sources.\n");
}
});
}
@ -295,14 +304,21 @@ bool MediaCaptureManager::CanTakePhoto()
if (m_currentState == Initialized)
{
OutputDebugString(L"Can Take Photo\n");
ret = true;
}
else
{
OutputDebugString(L"Can NOT Take Photo\n");
ret = false;
}
return ret;
}
bool MediaCaptureManager::CanToggleVideo()
{
auto lock = m_lock.LockShared();
bool ret = false;
if (m_currentState == Initialized || m_currentState == Recording)
{
ret = true;
}
return ret;
}

Просмотреть файл

@ -35,6 +35,7 @@ namespace HolographicMRCSample
bool IsHologramEnabled() { auto lock = m_lock.LockShared(); return m_hologramEnabled; }
bool IsSystemAudioEnabled() { auto lock = m_lock.LockShared(); return m_sysAudioEnabled; }
bool CanTakePhoto();
bool CanToggleVideo();
private:
Microsoft::WRL::Wrappers::SRWLock m_lock;

Просмотреть файл

@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
@ -39,5 +38,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
@ -39,5 +38,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -29,7 +29,7 @@ Scenario2::Scenario2()
mapIconStreamReference = RandomAccessStreamReference::CreateFromUri(ref new Uri("ms-appx:///Assets/MapPin.png"));
mapBillboardStreamReference = RandomAccessStreamReference::CreateFromUri(ref new Uri("ms-appx:///Assets/billboard.jpg"));
mapModelStreamReference = RandomAccessStreamReference::CreateFromUri(ref new Uri("ms-appx:///Assets/ConkerAfro.3mf"));
mapModelStreamReference = RandomAccessStreamReference::CreateFromUri(ref new Uri("ms-appx:///Assets/box.3mf"));
}
void Scenario2::MyMap_Loaded(Object^ sender, RoutedEventArgs^ e)

Просмотреть файл

@ -281,7 +281,7 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\shared\box.3mf">
<Link>Assets\ConkerAfro.3mf</Link>
<Link>Assets\box.3mf</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\shared\MyCustomStates.json">

Просмотреть файл

@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
@ -39,5 +38,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -32,12 +32,18 @@
<StackPanel x:Name="RenderingPanel" Visibility="Collapsed">
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock VerticalAlignment="center">View page</TextBlock>
<TextBox x:Name="PageNumberBox" InputScope="Number" Width="30" Text="1" TextAlignment="Right" Margin="5,0,5,0"/>
<TextBlock Name="ViewPageLabel" VerticalAlignment="center">View page</TextBlock>
<!-- Always give a TextBox a name that's accessible to a screen reader. In this case,
reference the labeling TextBlock to have the accessible name set on the TextBox. -->
<TextBox x:Name="PageNumberBox" InputScope="Number" Width="30" Text="1" TextAlignment="Right" Margin="5,0,5,0"
AutomationProperties.LabeledBy="{Binding ElementName=ViewPageLabel}"/>
<TextBlock VerticalAlignment="Center">of <Run x:Name="PageCountText"/>.</TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<ComboBox x:Name="Options" SelectedIndex="0">
<!-- Always give a ComboBox a name that's accessible to a screen reader. Given that there's no labeling
TextBlock to reference, explicitly set the accessible name on the ComboBox. A shipping app would
localize this name. -->
<ComboBox x:Name="Options" AutomationProperties.Name="View page size" SelectedIndex="0">
<ComboBoxItem>Actual size</ComboBoxItem>
<ComboBoxItem>Half size on beige background</ComboBoxItem>
<ComboBoxItem>Crop to center of page</ComboBoxItem>
@ -45,7 +51,9 @@
<Button Click="{x:Bind ViewPage}" Content="View" Margin="10,0,0,0"/>
</StackPanel>
<Image x:Name="Output" Stretch="None" Margin="0,10,0,0"/>
<!-- Always give an Image a name that's accessible to screen reader, (unless the Image is purely decorative.)
A shipping app would localize this name.-->
<Image x:Name="Output" AutomationProperties.Name="PDF document content" Stretch="None" Margin="0,10,0,0"/>
</StackPanel>
<ProgressRing x:Name="ProgressControl" Height="50" Width="50" IsActive="True" Visibility="Collapsed" Margin="0,10,0,0"/>
</StackPanel>

Просмотреть файл

@ -55,11 +55,10 @@
<RichTextBlockOverflow x:Name="ContinuationPageLinkedContainer" Grid.Row="3" Grid.ColumnSpan="2"/>
<Image Source="ms-appx:///Assets/print_1.png" x:Name="ScenarioImage" HorizontalAlignment="Center" Grid.Row="2" Grid.Column="1" Margin="10"/>
<StackPanel x:Name="Footer" Grid.Row="4" Grid.Column="0" VerticalAlignment="Top" Visibility="Collapsed">
<Image Source="ms-appx:///Assets/splash-sdk.png" HorizontalAlignment="Left" Stretch="None"/>
<RichTextBlock Foreground="Black" FontSize="16" TextAlignment="Left" FontFamily="Segoe UI">
<Paragraph>Copyright © Microsoft Corporation. All rights reserved.</Paragraph>
</RichTextBlock>
<StackPanel x:Name="Footer" Grid.Row="4" Grid.ColumnSpan="2">
<TextBlock Foreground="Black" FontSize="16" TextAlignment="Left" FontFamily="Segoe UI">
Copyright © Microsoft Corporation. All rights reserved.
</TextBlock>
</StackPanel>
</Grid>
</Page>

Просмотреть файл

@ -209,7 +209,8 @@ RichTextBlockOverflow^ PrintHelper::AddOnePrintPreviewPage(RichTextBlockOverflow
{
// If this is the first page add the specific scenario content
page = FirstPage;
//Hide footer since we don't know yet if it will be displayed (this might not be the last page) - wait for layout
// Hide footer since we don't know yet if it will be displayed (this might not be the last page) - wait for layout
StackPanel^ footer = safe_cast<StackPanel^>(page->FindName("Footer"));
footer->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
}
@ -248,6 +249,7 @@ RichTextBlockOverflow^ PrintHelper::AddOnePrintPreviewPage(RichTextBlockOverflow
{
StackPanel^ footer = safe_cast<StackPanel^>(page->FindName("Footer"));
footer->Visibility = Windows::UI::Xaml::Visibility::Visible;
PrintCanvas->UpdateLayout();
}
// Add the page to the page preview collection

Просмотреть файл

@ -103,7 +103,8 @@ RichTextBlockOverflow^ PreviewOptionsPrintHelper::AddOnePrintPage(RichTextBlockO
{
// If this is the first page add the specific scenario content
page = FirstPage;
//Hide footer since we don't know yet if it will be displayed (this might not be the last page) - wait for layout
// Hide footer since we don't know yet if it will be displayed (this might not be the last page) - wait for layout
StackPanel^ footer = safe_cast<StackPanel^>(page->FindName("Footer"));
footer->Visibility = Visibility::Collapsed;
}
@ -142,6 +143,7 @@ RichTextBlockOverflow^ PreviewOptionsPrintHelper::AddOnePrintPage(RichTextBlockO
{
StackPanel^ footer = safe_cast<StackPanel^>(page->FindName("Footer"));
footer->Visibility = Visibility::Visible;
PrintCanvas->UpdateLayout();
}
// Add the page to the page print collection

Просмотреть файл

@ -65,11 +65,10 @@
<RichTextBlockOverflow x:Name="ContinuationPageLinkedContainer" Grid.Row="3" Grid.ColumnSpan="2"/>
<Image Source="ms-appx:///Assets/print_1.png" x:Name="ScenarioImage" HorizontalAlignment="Center" Grid.Row="2" Grid.Column="1" Margin="10"/>
<StackPanel x:Name="Footer" Grid.Row="4" Grid.Column="0" VerticalAlignment="Top" Visibility="Collapsed">
<Image Source="ms-appx:///Assets/splash-sdk.png" HorizontalAlignment="Left" Stretch="None"/>
<RichTextBlock Foreground="Black" FontSize="16" TextAlignment="Left" FontFamily="Segoe UI">
<Paragraph>Copyright © Microsoft Corporation. All rights reserved.</Paragraph>
</RichTextBlock>
<StackPanel x:Name="Footer" Grid.Row="4" Grid.ColumnSpan="2">
<TextBlock Foreground="Black" FontSize="16" TextAlignment="Left" FontFamily="Segoe UI">
Copyright © Microsoft Corporation. All rights reserved.
</TextBlock>
</StackPanel>
</Grid>
</Page>

Просмотреть файл

@ -273,7 +273,8 @@ namespace PrintSample
{
// If this is the first page add the specific scenario content
page = firstPage;
//Hide footer since we don't know yet if it will be displayed (this might not be the last page) - wait for layout
// Hide footer since we don't know yet if it will be displayed (this might not be the last page) - wait for layout
StackPanel footer = (StackPanel)page.FindName("Footer");
footer.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
}
@ -312,6 +313,7 @@ namespace PrintSample
{
StackPanel footer = (StackPanel)page.FindName("Footer");
footer.Visibility = Windows.UI.Xaml.Visibility.Visible;
PrintCanvas.UpdateLayout();
}
// Add the page to the page preview collection

Просмотреть файл

@ -144,7 +144,8 @@ namespace PrintSample
{
// If this is the first page add the specific scenario content
page = firstPage;
//Hide footer since we don't know yet if it will be displayed (this might not be the last page) - wait for layout
// Hide footer since we don't know yet if it will be displayed (this might not be the last page) - wait for layout
StackPanel footer = (StackPanel)page.FindName("Footer");
footer.Visibility = Visibility.Collapsed;
}
@ -183,6 +184,7 @@ namespace PrintSample
{
StackPanel footer = (StackPanel)page.FindName("Footer");
footer.Visibility = Visibility.Visible;
PrintCanvas.UpdateLayout();
}
// Add the page to the print page collection

Просмотреть файл

@ -49,65 +49,81 @@
<ScrollViewer Grid.Row="1">
<StackPanel Orientation="Vertical">
<GridView IsItemClickEnabled="False" SelectionMode="None">
<!-- Provide an AutomationProperties.Name for a GridView to a screen reader. A shipping app would localize this. -->
<GridView AutomationProperties.Name="Radial Controller Events Hookup" IsItemClickEnabled="False" SelectionMode="None">
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<ItemsWrapGrid Orientation="Horizontal" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" />
</ItemsPanelTemplate>
</GridView.ItemsPanel>
<StackPanel Style="{StaticResource ButtonGroup}">
<Image Height="64" Width="64" HorizontalAlignment="Left" Source="Assets\Item0.png"/>
<!-- All shipping GridView items must have helpful, concise, localized and unique accessible names, so that
a screen reader can make your customers aware of their purpose. Given that this sample defines each item
here, (are the items are not databound,) set the accessible names on each item explicitly. This sample
contains placeholder text which would be replaced with appropriate localized text by a shipping app. -->
<!-- All shipping Images, Sliders, and ToggleSwitches must have helpful, concise, localized and unique
accessible names, so that a screen reader can make your customers aware of their purpose. This sample
contains placeholder text which would be replaced with appropriate localized text by a shipping app. -->
<StackPanel AutomationProperties.Name="Item 0 details" Style="{StaticResource ButtonGroup}">
<Image AutomationProperties.Name="Item 0 Image accessible name" Height="64" Width="64" HorizontalAlignment="Left" Source="Assets\Item0.png"/>
<Button Content="Add Item 0" Click="AddItem" CommandParameter="0"/>
<Button Content="Select Item 0" Click="SelectItem" CommandParameter="0"/>
<Button Content="Remove Item 0" Click="RemoveItem" CommandParameter="0"/>
<Slider x:Name="slider0" />
<ToggleSwitch x:Name="toggle0" />
<Slider AutomationProperties.Name="Item 0 Slider accessible name" x:Name="slider0" />
<ToggleSwitch x:Name="toggle0" AutomationProperties.Name="Item 0 ToggleSwitch accessible name" />
</StackPanel>
<StackPanel Style="{StaticResource ButtonGroup}">
<Image Height="64" Width="64" HorizontalAlignment="Left" Source="Assets\Item1.png"/>
<StackPanel AutomationProperties.Name="Item 1 details" Style="{StaticResource ButtonGroup}">
<Image AutomationProperties.Name="Item 1 Image accessible name" Height="64" Width="64" HorizontalAlignment="Left" Source="Assets\Item1.png"/>
<Button Content="Add Item 1" Click="AddItem" CommandParameter="1"/>
<Button Content="Select Item 1" Click="SelectItem" CommandParameter="1"/>
<Button Content="Remove Item 1" Click="RemoveItem" CommandParameter="1"/>
<Slider x:Name="slider1" />
<ToggleSwitch x:Name="toggle1" />
<Slider AutomationProperties.Name="Item 1 Slider accessible name" x:Name="slider1" />
<ToggleSwitch x:Name="toggle1" AutomationProperties.Name="Item 1 ToggleSwitch accessible name" />
</StackPanel>
<StackPanel Style="{StaticResource ButtonGroup}">
<Image Height="64" Width="64" HorizontalAlignment="Left" Source="Assets\Item2.png"/>
<StackPanel AutomationProperties.Name="Item 2 details" Style="{StaticResource ButtonGroup}">
<Image AutomationProperties.Name="Item 2 Image accessible name" Height="64" Width="64" HorizontalAlignment="Left" Source="Assets\Item2.png"/>
<Button Content="Add Item 2" Click="AddItem" CommandParameter="2"/>
<Button Content="Select Item 2" Click="SelectItem" CommandParameter="2"/>
<Button Content="Remove Item 2" Click="RemoveItem" CommandParameter="2"/>
<Slider x:Name="slider2" />
<ToggleSwitch x:Name="toggle2" />
<Slider AutomationProperties.Name="Item 2 Slider accessible name" x:Name="slider2" />
<ToggleSwitch x:Name="toggle2" AutomationProperties.Name="Item 2 ToggleSwitch accessible name" />
</StackPanel>
<StackPanel Style="{StaticResource ButtonGroup}">
<Image Height="64" Width="64" HorizontalAlignment="Left" Source="Assets\Item3.png"/>
<StackPanel AutomationProperties.Name="Item 3 details" Style="{StaticResource ButtonGroup}">
<Image AutomationProperties.Name="Item 3 Image accessible name" Height="64" Width="64" HorizontalAlignment="Left" Source="Assets\Item3.png"/>
<Button Content="Add Item 3" Click="AddItem" CommandParameter="3"/>
<Button Content="Select Item 3" Click="SelectItem" CommandParameter="3"/>
<Button Content="Remove Item 3" Click="RemoveItem" CommandParameter="3"/>
<Slider x:Name="slider3" />
<ToggleSwitch x:Name="toggle3" />
<Slider AutomationProperties.Name="Item 3 Slider accessible name" x:Name="slider3" />
<ToggleSwitch x:Name="toggle3" AutomationProperties.Name="Item 3 ToggleSwitch accessible name" />
</StackPanel>
<StackPanel Style="{StaticResource ButtonGroup}">
<TextBlock Height="64" Width="64" HorizontalAlignment="Left" FontFamily="Segoe UI Emoji" FontSize="45" Text="&#x2764;"/>
<!-- There's no guarantee that a symbolic character from some font will be pronounced by a screen reader
in a helpful way. So set helpful, concise, localized and uniqueaccessible names on the TextBlocks
so that a screen reader can make your customers aware of their purpose. This sample contains
placeholder text which would be replaced with appropriate localized text by a shipping app. -->
<StackPanel AutomationProperties.Name="Item 4 details" Style="{StaticResource ButtonGroup}">
<TextBlock AutomationProperties.Name="Item 4 TextBlock accessible name" Height="64" Width="64" HorizontalAlignment="Left" FontFamily="Segoe UI Emoji" FontSize="45" Text="&#x2764;"/>
<Button Content="Add Item 4" Click="AddItem" CommandParameter="4"/>
<Button Content="Select Item 4" Click="SelectItem" CommandParameter="4"/>
<Button Content="Remove Item 4" Click="RemoveItem" CommandParameter="4"/>
<Slider x:Name="slider4" />
<ToggleSwitch x:Name="toggle4" />
<Slider AutomationProperties.Name="Item 4 Slider accessible name" x:Name="slider4" />
<ToggleSwitch x:Name="toggle4" AutomationProperties.Name="Item 4 ToggleSwitch accessible name" />
</StackPanel>
<StackPanel Style="{StaticResource ButtonGroup}">
<TextBlock Height="64" Width="64" HorizontalAlignment="Left" FontFamily="Assets\fontawesome-webfont.ttf#FontAwesome" FontSize="57" Text="&#xf0a1;"/>
<StackPanel AutomationProperties.Name="Item 5 details" Style="{StaticResource ButtonGroup}">
<TextBlock AutomationProperties.Name="Item 5 TextBlock accessible name" Height="64" Width="64" HorizontalAlignment="Left" FontFamily="Assets\fontawesome-webfont.ttf#FontAwesome" FontSize="57" Text="&#xf0a1;"/>
<Button Content="Add Item 5" Click="AddItem" CommandParameter="5"/>
<Button Content="Select Item 5" Click="SelectItem" CommandParameter="5"/>
<Button Content="Remove Item 5" Click="RemoveItem" CommandParameter="5"/>
<Slider x:Name="slider5" />
<ToggleSwitch x:Name="toggle5" />
<Slider AutomationProperties.Name="Item 5 Slider accessible name" x:Name="slider5" />
<ToggleSwitch x:Name="toggle5" AutomationProperties.Name="Item 5 ToggleSwitch accessible name" />
</StackPanel>
</GridView>
@ -121,7 +137,7 @@
<StackPanel Style="{StaticResource PaddedPanel}">
<TextBlock FontSize="20">Log</TextBlock>
<ScrollViewer x:Name="logViewer" Grid.Column="0" MaxHeight="300" Padding="0,0,20,0">
<TextBlock x:Name="log" SizeChanged="OnLogSizeChanged"/>
<TextBlock x:Name="log" SizeChanged="OnLogSizeChanged" />
</ScrollViewer>
</StackPanel>
</StackPanel>

Просмотреть файл

@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
@ -39,5 +38,3 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -36,47 +36,58 @@
<ScrollViewer Grid.Row="1" VerticalScrollMode="Auto" VerticalScrollBarVisibility="Auto">
<StackPanel Orientation="Vertical" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock Text="Friendly Name" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<TextBox x:Name="FriendlyName" Text="My Virtual Smart Card" HorizontalAlignment="Left"/>
<TextBlock Name="FriendlyNameLabel" Text="Friendly Name" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<!-- Always give a TextBox a name that's accessible to a screen reader. In this case,
reference the labeling TextBlock to have the accessible name set on the TextBox. -->
<TextBox x:Name="FriendlyName" Text="My Virtual Smart Card" HorizontalAlignment="Left"
AutomationProperties.LabeledBy="{Binding ElementName=FriendlyNameLabel}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock Text="Minimum PIN length" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<TextBox x:Name="PinMinLength" InputScope="Number" Text="8" HorizontalAlignment="Left"/>
<TextBlock Name="PinMinLengthLabel" Text="Minimum PIN length" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<TextBox x:Name="PinMinLength" InputScope="Number" Text="8" HorizontalAlignment="Left"
AutomationProperties.LabeledBy="{Binding ElementName=PinMinLengthLabel}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock Text="Maximum PIN length" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<TextBox x:Name="PinMaxLength" InputScope="Number" Text="127" HorizontalAlignment="Left"/>
<TextBlock Name="PinMaxLengthLabel" Text="Maximum PIN length" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<TextBox x:Name="PinMaxLength" InputScope="Number" Text="127" HorizontalAlignment="Left"
AutomationProperties.LabeledBy="{Binding ElementName=PinMaxLengthLabel}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock Text="Character Set" HorizontalAlignment="Left" />
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock Text="Uppercase" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<ComboBox x:Name="PinUppercase" SelectedIndex="1" HorizontalAlignment="Left" VerticalAlignment="Center">
<TextBlock Name="PinUppercaseLabel" Text="Uppercase" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<!-- Always give a ComboBox a name that's accessible to a screen reader. In this case,
reference the labeling TextBlock to have the accessible name set on the ComboBox. -->
<ComboBox x:Name="PinUppercase" SelectedIndex="1" HorizontalAlignment="Left" VerticalAlignment="Center"
AutomationProperties.LabeledBy="{Binding ElementName=PinUppercaseLabel}">
<x:String>Disallowed</x:String>
<x:String>Allowed</x:String>
<x:String>Require At Least One</x:String>
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock Text="Lowercase" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<ComboBox x:Name="PinLowercase" SelectedIndex="1" HorizontalAlignment="Left" VerticalAlignment="Center">
<TextBlock Name="PinLowercaseLabel" Text="Lowercase" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<ComboBox x:Name="PinLowercase" SelectedIndex="1" HorizontalAlignment="Left" VerticalAlignment="Center"
AutomationProperties.LabeledBy="{Binding ElementName=PinLowercaseLabel}">
<x:String>Disallowed</x:String>
<x:String>Allowed</x:String>
<x:String>Require At Least One</x:String>
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock Text="Digits" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<ComboBox x:Name="PinDigits" SelectedIndex="1" HorizontalAlignment="Left" VerticalAlignment="Center">
<TextBlock Name="PinDigitsLabel" Text="Digits" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<ComboBox x:Name="PinDigits" SelectedIndex="1" HorizontalAlignment="Left" VerticalAlignment="Center"
AutomationProperties.LabeledBy="{Binding ElementName=PinDigitsLabel}">
<x:String>Disallowed</x:String>
<x:String>Allowed</x:String>
<x:String>Require At Least One</x:String>
</ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<TextBlock Text="Special" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<ComboBox x:Name="PinSpecial" SelectedIndex="1" HorizontalAlignment="Left" VerticalAlignment="Center">
<TextBlock Name="PinSpecialLabel" Text="Special" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Center" Width="85"/>
<ComboBox x:Name="PinSpecial" SelectedIndex="1" HorizontalAlignment="Left" VerticalAlignment="Center"
AutomationProperties.LabeledBy="{Binding ElementName=PinSpecialLabel}">
<x:String>Disallowed</x:String>
<x:String>Allowed</x:String>
<x:String>Require At Least One</x:String>

Просмотреть файл

@ -36,20 +36,27 @@
<Border x:Name="ErrorBorder" Background="Red" Grid.Row="2"/>
<TextBlock x:Name="StatusBlock" Grid.Row="2" Margin="12, 10, 12, 10" Visibility="Collapsed"/>
</Grid>
<Button Content="Play" Click="PlayButton_Click" HorizontalAlignment="Left" Margin="93,273,0,335" Width="47"/>
<Button Content="Stop" Click="StopButton_Click" HorizontalAlignment="Left" Margin="189,273,0,335" Width="50"/>
<Slider x:Name="RadiusSlider" HorizontalAlignment="Left" Margin="9,213,0,0" VerticalAlignment="Top" Width="152" Maximum="10" LargeChange="1" Value="1" ValueChanged="RadiusSlider_ValueChanged" SmallChange="0.1" TickFrequency="1" StepFrequency="0.1"/>
<ComboBox x:Name="EnvironmentComboBox" HorizontalAlignment="Left" Margin="9,100,0,0" VerticalAlignment="Top" Width="160" IsDropDownOpen="True" SelectionChanged="EnvironmentComboBox_SelectionChanged">
<!-- Always give ComboBoxes and Sliders names that are accessible to a screen reader.
In this case, reference the labeling TextBlocks to have the accessible names set
on the ComboBoxes and Sliders. -->
<TextBlock x:Name="textBlock1" HorizontalAlignment="Left" Margin="10,74,0,0" TextWrapping="Wrap" Text="Environment" VerticalAlignment="Top"/>
<ComboBox x:Name="EnvironmentComboBox" HorizontalAlignment="Left" Margin="9,100,0,0" VerticalAlignment="Top" Width="160" IsDropDownOpen="True" SelectionChanged="EnvironmentComboBox_SelectionChanged"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock1}">
<x:String>Small Room</x:String>
<x:String>Medium Room</x:String>
<x:String>Large Room</x:String>
<x:String>Outdoors</x:String>
</ComboBox>
<TextBlock x:Name="textBlock" HorizontalAlignment="Left" Margin="9,203,0,0" TextWrapping="Wrap" Text="Radius of Orbit" VerticalAlignment="Top"/>
<TextBlock x:Name="textBlock1" HorizontalAlignment="Left" Margin="10,74,0,0" TextWrapping="Wrap" Text="Environment" VerticalAlignment="Top"/>
<TextBlock x:Name="textBlock2" HorizontalAlignment="Left" Margin="9,149,0,0" TextWrapping="Wrap" Text="Speed of Orbit in Seconds" VerticalAlignment="Top"/>
<Slider x:Name="RotationSpeedSlider" HorizontalAlignment="Left" Margin="10,159,0,0" VerticalAlignment="Top" Width="152" Maximum="20" LargeChange="1" ValueChanged="RotationSpeedSlider_ValueChanged" SmallChange="0.5"/>
<Slider x:Name="HeightSlider" HorizontalAlignment="Left" Margin="191,213,0,0" VerticalAlignment="Top" Width="152" Minimum="-10" Maximum="10" LargeChange="1" SmallChange="0.5" ValueChanged="HeightSlider_ValueChanged"/>
<Slider x:Name="RotationSpeedSlider" HorizontalAlignment="Left" Margin="10,159,0,0" VerticalAlignment="Top" Width="152" Maximum="20" LargeChange="1" ValueChanged="RotationSpeedSlider_ValueChanged" SmallChange="0.5"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock2}"/>
<TextBlock x:Name="textBlock" HorizontalAlignment="Left" Margin="9,203,0,0" TextWrapping="Wrap" Text="Radius of Orbit" VerticalAlignment="Top"/>
<Slider x:Name="RadiusSlider" HorizontalAlignment="Left" Margin="9,213,0,0" VerticalAlignment="Top" Width="152" Maximum="10" LargeChange="1" Value="1" ValueChanged="RadiusSlider_ValueChanged" SmallChange="0.1" TickFrequency="1" StepFrequency="0.1"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock}"/>
<TextBlock x:Name="textBlock3" HorizontalAlignment="Left" Margin="191,203,0,0" TextWrapping="Wrap" Text="Height of Orbit" VerticalAlignment="Top"/>
<Slider x:Name="HeightSlider" HorizontalAlignment="Left" Margin="191,213,0,0" VerticalAlignment="Top" Width="152" Minimum="-10" Maximum="10" LargeChange="1" SmallChange="0.5" ValueChanged="HeightSlider_ValueChanged"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock3}"/>
<Button Content="Play" Click="PlayButton_Click" HorizontalAlignment="Left" Margin="93,273,0,335" Width="47"/>
<Button Content="Stop" Click="StopButton_Click" HorizontalAlignment="Left" Margin="189,273,0,335" Width="50"/>
</Grid>
</Page>

Просмотреть файл

@ -26,32 +26,47 @@
</Grid.ColumnDefinitions>
<TextBlock x:Name="textBlock" HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" Text="Description:" VerticalAlignment="Top" FontSize="26.667" Height="35" Width="140"/>
<TextBlock x:Name="textBlock1" HorizontalAlignment="Left" Margin="10,50,0,0" TextWrapping="Wrap" Text="Source with cardioid directivity pattern" VerticalAlignment="Top" FontSize="13.333" Height="18" Width="229"/>
<Slider x:Name="ScalingSlider" HorizontalAlignment="Left" Margin="10,177,0,0" VerticalAlignment="Top" Width="160" LargeChange="0.5" Maximum="1" SmallChange="0.1" StepFrequency="0.1" TickFrequency="0.1" Height="44" ValueChanged="ScalingSlider_ValueChanged" ToolTipService.ToolTip="0 is Omnidirectional and 1 is fully directional"/>
<Slider x:Name="OrderSlider" HorizontalAlignment="Left" Margin="189,177,0,0" VerticalAlignment="Top" Width="160" LargeChange="0.5" Maximum="32" SmallChange="0.1" StepFrequency="0.1" Minimum="0.1" Height="44" TickFrequency="0.1" ValueChanged="OrderSlider_ValudChanged" ToolTipService.ToolTip="Higher the order, narrower the directivity pattern"/>
<ComboBox x:Name="EnvironmentComboBox" HorizontalAlignment="Left" Margin="10,115,0,0" VerticalAlignment="Top" Width="160" SelectionChanged="EnvironmentComboBox_SelectionChanged" Height="28">
<!-- Always give ComboBoxes and Sliders names that are accessible to a screen reader.
In this case, reference the labeling TextBlocks to have the accessible names set
on the ComboBoxes and Sliders. -->
<TextBlock x:Name="textBlock4" HorizontalAlignment="Left" Margin="10,90,0,0" TextWrapping="Wrap" Text="Environment" VerticalAlignment="Top"/>
<ComboBox x:Name="EnvironmentComboBox" HorizontalAlignment="Left" Margin="10,115,0,0" VerticalAlignment="Top" Width="160" SelectionChanged="EnvironmentComboBox_SelectionChanged" Height="28"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock4}">
<x:String>Small Room</x:String>
<x:String>Medium Room</x:String>
<x:String>Large Room</x:String>
<x:String>Outdoors</x:String>
</ComboBox>
<Slider x:Name="YawSlider" HorizontalAlignment="Left" Margin="10,337,0,0" VerticalAlignment="Top" Width="100" Maximum="6.283185307" SmallChange="0.5" Height="44" ValueChanged="YawSlider_ValueChanged" LargeChange="0.5"/>
<Slider x:Name="PitchSlider" HorizontalAlignment="Left" Margin="120,337,0,0" VerticalAlignment="Top" Width="100" Maximum="6.283185307" SmallChange="0.5" Height="44" ValueChanged="PitchSlider_ValueChanged" LargeChange="0.5"/>
<Slider x:Name="RollSlider" HorizontalAlignment="Left" Margin="235,337,0,0" VerticalAlignment="Top" Width="100" Maximum="6.283185307" SmallChange="0.5" Height="44" ValueChanged="RollSlider_ValueChanged" LargeChange="0.5"/>
<Button x:Name="PlayButton" Content="Play" HorizontalAlignment="Left" Margin="93,396,0,0" VerticalAlignment="Top" Height="32" Width="47" Click="PlayButton_Click"/>
<Button x:Name="StopButton" Content="Stop" HorizontalAlignment="Left" Margin="189,396,0,0" VerticalAlignment="Top" Height="32" Width="50" Click="StopButton_Click"/>
<TextBlock x:Name="textBlock2" HorizontalAlignment="Left" Margin="10,164,0,0" TextWrapping="Wrap" Text="Directivity Scaling" VerticalAlignment="Top"/>
<Slider x:Name="ScalingSlider" HorizontalAlignment="Left" Margin="10,177,0,0" VerticalAlignment="Top" Width="160" LargeChange="0.5" Maximum="1" SmallChange="0.1" StepFrequency="0.1" TickFrequency="0.1" Height="44" ValueChanged="ScalingSlider_ValueChanged" ToolTipService.ToolTip="0 is Omnidirectional and 1 is fully directional"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock2}" />
<TextBlock x:Name="textBlock3" HorizontalAlignment="Left" Margin="189,164,0,0" TextWrapping="Wrap" Text="Cardioid Order" VerticalAlignment="Top"/>
<TextBlock x:Name="textBlock4" HorizontalAlignment="Left" Margin="10,90,0,0" TextWrapping="Wrap" Text="Environment" VerticalAlignment="Top"/>
<TextBlock x:Name="textBlock5" HorizontalAlignment="Left" Margin="10,326,0,0" TextWrapping="Wrap" Text="Yaw" VerticalAlignment="Top"/>
<TextBlock x:Name="textBlock6" HorizontalAlignment="Left" Margin="137,326,0,0" TextWrapping="Wrap" Text="Pitch" VerticalAlignment="Top"/>
<TextBlock x:Name="textBlock7" HorizontalAlignment="Left" Margin="250,326,0,0" TextWrapping="Wrap" Text="Roll" VerticalAlignment="Top"/>
<TextBlock x:Name="textBlock8" HorizontalAlignment="Left" Margin="10,300,0,0" TextWrapping="Wrap" Text="Source Orientation in Radians" VerticalAlignment="Top"/>
<Slider x:Name="OrderSlider" HorizontalAlignment="Left" Margin="189,177,0,0" VerticalAlignment="Top" Width="160"
LargeChange="0.5" Maximum="32" SmallChange="0.1" StepFrequency="0.1" Minimum="0.1" Height="44" TickFrequency="0.1"
ValueChanged="OrderSlider_ValudChanged"
ToolTipService.ToolTip="Higher the order, narrower the directivity pattern"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock3}" />
<TextBlock x:Name="textBlock9" HorizontalAlignment="Left" Margin="10,220,0,0" TextWrapping="Wrap" Text="Source Position in Meters" VerticalAlignment="Top"/>
<TextBlock x:Name="textBlock10" HorizontalAlignment="Left" Margin="10,252,0,364" TextWrapping="Wrap" Text="X:" VerticalAlignment="Center" Height="24" Width="25"/>
<Slider x:Name="SourcePositionXSlider" HorizontalAlignment="Left" Margin="30,244,0,0" VerticalAlignment="Top" Width="80" Height="44" Maximum="10" LargeChange="1" SmallChange="0.5" ValueChanged="SourcePositionX_ValueChanged" Minimum="-10"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock10}" />
<TextBlock x:Name="textBlock11" HorizontalAlignment="Left" Margin="126,253,0,0" TextWrapping="Wrap" Text="Y:" VerticalAlignment="Top" Width="27"/>
<Slider x:Name="SourcePositionYSlider" HorizontalAlignment="Left" Margin="149,244,0,0" VerticalAlignment="Top" Width="80" Height="44" Maximum="10" LargeChange="1" SmallChange="0.5" ValueChanged="SourcePositionY_ValueChanged" Minimum="-10"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock11}" />
<TextBlock x:Name="textBlock12" HorizontalAlignment="Left" Margin="250,253,0,0" TextWrapping="Wrap" Text="Z:" VerticalAlignment="Top"/>
<Slider x:Name="SourcePositionXSlider" HorizontalAlignment="Left" Margin="30,244,0,0" VerticalAlignment="Top" Width="80" Height="44" Maximum="10" LargeChange="1" SmallChange="0.5" ValueChanged="SourcePositionX_ValueChanged" Minimum="-10"/>
<Slider x:Name="SourcePositionYSlider" HorizontalAlignment="Left" Margin="149,244,0,0" VerticalAlignment="Top" Width="80" Height="44" Maximum="10" LargeChange="1" SmallChange="0.5" ValueChanged="SourcePositionY_ValueChanged" Minimum="-10"/>
<Slider x:Name="SourcePositionZSlider" HorizontalAlignment="Left" Margin="269,244,0,0" VerticalAlignment="Top" Width="80" Height="44" Maximum="10" LargeChange="1" SmallChange="0.5" ValueChanged="SourcePositionZ_ValueChanged" Minimum="-10"/>
<Slider x:Name="SourcePositionZSlider" HorizontalAlignment="Left" Margin="269,244,0,0" VerticalAlignment="Top" Width="80" Height="44" Maximum="10" LargeChange="1" SmallChange="0.5" ValueChanged="SourcePositionZ_ValueChanged" Minimum="-10"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock12}" />
<TextBlock x:Name="textBlock8" HorizontalAlignment="Left" Margin="10,300,0,0" TextWrapping="Wrap" Text="Source Orientation in Radians" VerticalAlignment="Top"/>
<TextBlock x:Name="textBlock5" HorizontalAlignment="Left" Margin="10,326,0,0" TextWrapping="Wrap" Text="Yaw" VerticalAlignment="Top"/>
<Slider x:Name="YawSlider" HorizontalAlignment="Left" Margin="10,337,0,0" VerticalAlignment="Top" Width="100" Maximum="6.283185307" SmallChange="0.5" Height="44" ValueChanged="YawSlider_ValueChanged" LargeChange="0.5"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock5}" />
<TextBlock x:Name="textBlock6" HorizontalAlignment="Left" Margin="137,326,0,0" TextWrapping="Wrap" Text="Pitch" VerticalAlignment="Top"/>
<Slider x:Name="PitchSlider" HorizontalAlignment="Left" Margin="120,337,0,0" VerticalAlignment="Top" Width="100" Maximum="6.283185307" SmallChange="0.5" Height="44" ValueChanged="PitchSlider_ValueChanged" LargeChange="0.5"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock6}" />
<TextBlock x:Name="textBlock7" HorizontalAlignment="Left" Margin="250,326,0,0" TextWrapping="Wrap" Text="Roll" VerticalAlignment="Top"/>
<Slider x:Name="RollSlider" HorizontalAlignment="Left" Margin="235,337,0,0" VerticalAlignment="Top" Width="100" Maximum="6.283185307" SmallChange="0.5" Height="44" ValueChanged="RollSlider_ValueChanged" LargeChange="0.5"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock7}" />
<Button x:Name="PlayButton" Content="Play" HorizontalAlignment="Left" Margin="93,396,0,0" VerticalAlignment="Top" Height="32" Width="47" Click="PlayButton_Click"/>
<Button x:Name="StopButton" Content="Stop" HorizontalAlignment="Left" Margin="189,396,0,0" VerticalAlignment="Top" Height="32" Width="50" Click="StopButton_Click"/>
</Grid>
</Page>

Просмотреть файл

@ -25,8 +25,12 @@
</Grid.ColumnDefinitions>
<TextBlock HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" Text="Description:" VerticalAlignment="Top" FontSize="26.667" Height="35" Width="140"/>
<TextBlock x:Name="textBlock" HorizontalAlignment="Left" Margin="10,50,0,0" TextWrapping="Wrap" Text="Source with custom decay" VerticalAlignment="Top" FontSize="13.333" Height="18" Width="229"/>
<!-- Always give ComboBoxes and Sliders names that are accessible to a screen reader.
In this case, reference the labeling TextBlocks to have the accessible names set
on the ComboBoxes and Sliders. -->
<TextBlock x:Name="textBlock4" HorizontalAlignment="Left" Margin="10,90,0,0" TextWrapping="Wrap" Text="HRTF Environment" VerticalAlignment="Top"/>
<ComboBox x:Name="EnvironmentComboBox" HorizontalAlignment="Left" Margin="10,115,0,0" VerticalAlignment="Top" Width="160" Height="28" SelectionChanged="EnvironmentComboBox_SelectionChanged">
<ComboBox x:Name="EnvironmentComboBox" HorizontalAlignment="Left" Margin="10,115,0,0" VerticalAlignment="Top" Width="160" Height="28" SelectionChanged="EnvironmentComboBox_SelectionChanged"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock4}">
<x:String>Small Room</x:String>
<x:String>Medium Room</x:String>
<x:String>Large Room</x:String>
@ -34,13 +38,16 @@
</ComboBox>
<TextBlock x:Name="textBlock9" HorizontalAlignment="Left" Margin="10,169,0,0" TextWrapping="Wrap" Text="Source Position in Meters" VerticalAlignment="Top"/>
<TextBlock x:Name="textBlock10" HorizontalAlignment="Left" Margin="10,201,0,415" TextWrapping="Wrap" Text="X:" VerticalAlignment="Center" Height="24" Width="25"/>
<Slider x:Name="SourcePositionXSlider" HorizontalAlignment="Left" Margin="30,193,0,0" VerticalAlignment="Top" Width="80" Height="44" Maximum="10" LargeChange="1" SmallChange="0.5" Minimum="-10" ValueChanged="SourcePositionX_ValueChanged"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock10}" />
<TextBlock x:Name="textBlock11" HorizontalAlignment="Left" Margin="126,202,0,0" TextWrapping="Wrap" Text="Y:" VerticalAlignment="Top" Width="27"/>
<Slider x:Name="SourcePositionYSlider" HorizontalAlignment="Left" Margin="149,193,0,0" VerticalAlignment="Top" Width="80" Height="44" Maximum="10" LargeChange="1" SmallChange="0.5" Minimum="-10" ValueChanged="SourcePositionY_ValueChanged"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock11}" />
<TextBlock x:Name="textBlock12" HorizontalAlignment="Left" Margin="250,202,0,0" TextWrapping="Wrap" Text="Z:" VerticalAlignment="Top"/>
<Slider x:Name="SourcePositionXSlider" HorizontalAlignment="Left" Margin="30,193,0,0" VerticalAlignment="Top" Width="80" Height="44" Maximum="10" LargeChange="1" SmallChange="0.5" Minimum="-10" ValueChanged="SourcePositionX_ValueChanged"/>
<Slider x:Name="SourcePositionYSlider" HorizontalAlignment="Left" Margin="149,193,0,0" VerticalAlignment="Top" Width="80" Height="44" Maximum="10" LargeChange="1" SmallChange="0.5" Minimum="-10" ValueChanged="SourcePositionY_ValueChanged"/>
<Slider x:Name="SourcePositionZSlider" HorizontalAlignment="Left" Margin="269,193,0,0" VerticalAlignment="Top" Width="80" Height="44" Maximum="10" LargeChange="1" SmallChange="0.5" Minimum="-10" ValueChanged="SourcePositionZ_ValueChanged"/>
<Slider x:Name="SourcePositionZSlider" HorizontalAlignment="Left" Margin="269,193,0,0" VerticalAlignment="Top" Width="80" Height="44" Maximum="10" LargeChange="1" SmallChange="0.5" Minimum="-10" ValueChanged="SourcePositionZ_ValueChanged"
AutomationProperties.LabeledBy="{Binding ElementName=textBlock12}" />
<Button x:Name="PlayButton" Content="Play" HorizontalAlignment="Left" Margin="93,252,0,0" VerticalAlignment="Top" Height="32" Width="47" Click="PlayButton_Click"/>
<Button x:Name="StopButton" Content="Stop" HorizontalAlignment="Left" Margin="189,252,0,0" VerticalAlignment="Top" Height="32" Width="50" Click="StopButton_Click"/>
</Grid>
</Page>

Просмотреть файл

@ -11,7 +11,7 @@
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
<FileAlignment>512</FileAlignment>

Просмотреть файл

@ -12,7 +12,7 @@
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>false</EnableDotNetNativeCompatibleProfile>
<FileAlignment>512</FileAlignment>

Просмотреть файл

@ -36,7 +36,7 @@
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.16299.0</WindowsTargetPlatformMinVersion>
<WindowsTargetPlatformMinVersion>10.0.15063.0</WindowsTargetPlatformMinVersion>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

Просмотреть файл

@ -42,7 +42,7 @@
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.16299.0</WindowsTargetPlatformMinVersion>
<WindowsTargetPlatformMinVersion>10.0.15063.0</WindowsTargetPlatformMinVersion>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

Просмотреть файл

@ -12,7 +12,7 @@
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

Просмотреть файл

@ -298,7 +298,9 @@ namespace DataVirtualizationSample
else
{
// Cancel the existing request
#if TRACE_DATASOURCE
Debug.WriteLine(">" + debugName + " Cancelling request: " + requestInProgress.FirstIndex + "->" + requestInProgress.LastIndex);
#endif
cancelTokenSource.Cancel();
}
}

Просмотреть файл

@ -24,7 +24,19 @@ namespace DataVirtualizationSample
public static bool ContiguousOrOverlaps(this ItemIndexRange This, ItemIndexRange range)
{
return (range.FirstIndex >= This.FirstIndex && range.FirstIndex <= This.LastIndex + 1) || (range.LastIndex + 1 >= This.FirstIndex && range.LastIndex <= This.LastIndex);
// This is left
if(This.FirstIndex < range.FirstIndex)
{
return (range.FirstIndex <= This.LastIndex + 1);
}
// This is right
else if (This.FirstIndex > range.FirstIndex)
{
return (This.FirstIndex <= range.LastIndex + 1);
}
// Aligned
return true;
}
public static bool Intersects(this ItemIndexRange This, ItemIndexRange range)

Просмотреть файл

@ -32,6 +32,8 @@ To obtain information about Microsoft Visual Studio and the tools for developing
Each control page in the application has links to the relevant MSDN documentation for that control.
[Install a prebuilt version of this sample](https://www.microsoft.com/store/productId/9MSVH128X2ZT).
## Related samples
[RSS reader sample](https://github.com/Microsoft/Windows-appsample-rssreader)

Просмотреть файл

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
VisualStudioVersion = 15.0.27004.2002
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppUIBasics", "AppUIBasics.csproj", "{D40690AC-37E8-5492-9D42-85042FB025E4}"
EndProject
@ -37,4 +37,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5B033CDA-6491-405C-A05B-CEE6AC4060B9}
EndGlobalSection
EndGlobal

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 173 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 201 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 219 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 271 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 452 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 2.4 KiB

После

Ширина:  |  Высота:  |  Размер: 966 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 3.1 KiB

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 4.1 KiB

После

Ширина:  |  Высота:  |  Размер: 1.6 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 5.9 KiB

После

Ширина:  |  Высота:  |  Размер: 2.3 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 17 KiB

После

Ширина:  |  Высота:  |  Размер: 6.0 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 412 B

После

Ширина:  |  Высота:  |  Размер: 142 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 156 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 517 B

После

Ширина:  |  Высота:  |  Размер: 173 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 5.0 KiB

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 201 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 669 B

После

Ширина:  |  Высота:  |  Размер: 200 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 219 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 224 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 930 B

После

Ширина:  |  Высота:  |  Размер: 271 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 308 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 318 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 355 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 388 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 452 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 712 B

После

Ширина:  |  Высота:  |  Размер: 222 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 800 B

После

Ширина:  |  Высота:  |  Размер: 248 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 998 B

После

Ширина:  |  Высота:  |  Размер: 296 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.2 KiB

После

Ширина:  |  Высота:  |  Размер: 369 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 2.6 KiB

После

Ширина:  |  Высота:  |  Размер: 718 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 368 B

После

Ширина:  |  Высота:  |  Размер: 142 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 156 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 475 B

После

Ширина:  |  Высота:  |  Размер: 173 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 4.0 KiB

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 201 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 549 B

После

Ширина:  |  Высота:  |  Размер: 200 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 219 B

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше