Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
PR 25194: Updated Windows UI Samples for BUILD 2016
Browse files Browse the repository at this point in the history
Updated Windows UI Samples for BUILD 2016
  • Loading branch information
pgills authored and jevansaks committed Mar 30, 2016
1 parent f19298e commit 6e83406
Show file tree
Hide file tree
Showing 1,019 changed files with 12,258 additions and 240,546 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@
</Page>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.UI.Composition.Toolkit\Microsoft.UI.Composition.Toolkit.vcxproj">
<Project>{08a7d060-593a-4978-8dcc-b2029aca7c95}</Project>
<Name>Microsoft.UI.Composition.Toolkit</Name>
<ProjectReference Include="..\..\SamplesCommon\SamplesCommon\SamplesCommon.csproj">
<Project>{0b6a4830-d1ff-4018-baa2-7257eb4579fe}</Project>
<Name>SamplesCommon</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
62 changes: 62 additions & 0 deletions Demos/EffectEditor/EffectEditor.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EffectEditor", "EffectEditor.csproj", "{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SamplesCommon", "..\..\SamplesCommon\SamplesCommon\SamplesCommon.csproj", "{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Debug|Any CPU.ActiveCfg = Debug|x86
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Debug|ARM.ActiveCfg = Debug|ARM
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Debug|ARM.Build.0 = Debug|ARM
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Debug|ARM.Deploy.0 = Debug|ARM
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Debug|x64.ActiveCfg = Debug|x64
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Debug|x64.Build.0 = Debug|x64
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Debug|x64.Deploy.0 = Debug|x64
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Debug|x86.ActiveCfg = Debug|x86
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Debug|x86.Build.0 = Debug|x86
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Debug|x86.Deploy.0 = Debug|x86
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Release|Any CPU.ActiveCfg = Release|x86
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Release|ARM.ActiveCfg = Release|ARM
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Release|ARM.Build.0 = Release|ARM
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Release|ARM.Deploy.0 = Release|ARM
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Release|x64.ActiveCfg = Release|x64
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Release|x64.Build.0 = Release|x64
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Release|x64.Deploy.0 = Release|x64
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Release|x86.ActiveCfg = Release|x86
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Release|x86.Build.0 = Release|x86
{5A5AB5B9-CAEC-475A-8878-C13E7788F4D8}.Release|x86.Deploy.0 = Release|x86
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Debug|ARM.ActiveCfg = Debug|ARM
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Debug|ARM.Build.0 = Debug|ARM
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Debug|x64.ActiveCfg = Debug|x64
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Debug|x64.Build.0 = Debug|x64
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Debug|x86.ActiveCfg = Debug|x86
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Debug|x86.Build.0 = Debug|x86
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Release|Any CPU.Build.0 = Release|Any CPU
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Release|ARM.ActiveCfg = Release|ARM
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Release|ARM.Build.0 = Release|ARM
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Release|x64.ActiveCfg = Release|x64
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Release|x64.Build.0 = Release|x64
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Release|x86.ActiveCfg = Release|x86
{0B6A4830-D1FF-4018-BAA2-7257EB4579FE}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
using System.Xml;
using Microsoft.Graphics.Canvas;
using Microsoft.Graphics.Canvas.Effects;
using Microsoft.UI.Composition.Toolkit;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Graphics.Imaging;
Expand All @@ -40,6 +39,8 @@
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using SamplesCommon;
using SamplesCommon.ImageLoader;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

Expand Down Expand Up @@ -107,26 +108,10 @@ void InitializeValues()

private CompositionSurfaceBrush CreateBrushFromAsset(string name, out Size size)
{
Uri localUri = new Uri("ms-appx:///Assets/" + name);
CompositionImageFactory surfaceFactory
= CompositionImageFactory.CreateCompositionImageFactory(m_compositor);
var image = surfaceFactory.CreateImageFromUri(localUri);

bool isCompleted = false;
var waitHandle = new AutoResetEvent(false);
image.ImageLoaded += (CompositionImage sender, CompositionImageLoadStatus status) =>
{
isCompleted = true;
waitHandle.Set();
};

while (!isCompleted)
{
waitHandle.WaitOne();
}

size = image.Size;
return m_compositor.CreateSurfaceBrush(image.Surface);
IImageLoader imageLoader = ImageLoaderFactory.CreateImageLoader(m_compositor);
CompositionDrawingSurface surface = imageLoader.LoadImageFromUri(new Uri("ms-appx:///Assets/" + name));
size = surface.Size;
return m_compositor.CreateSurfaceBrush(surface);
}

private CompositionSurfaceBrush CreateBrushFromAsset(string name)
Expand All @@ -145,7 +130,7 @@ private void MainGridLoaded(object sender, RoutedEventArgs e)
m_noEffectBrush = CreateBrushFromAsset(
"Bruno'sFamily2015 (13)-X2.jpg",
out imageSize);
m_imageAspectRatio = imageSize.Width / imageSize.Height;
m_imageAspectRatio = (imageSize.Width == 0 && imageSize.Height == 0) ? 1 : imageSize.Width / imageSize.Height;

m_sprite = m_compositor.CreateSpriteVisual();
ResizeImage(new Size(MainGrid.ActualWidth, MainGrid.ActualHeight));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"Microsoft.ApplicationInsights": "1.2.3",
"Microsoft.ApplicationInsights.PersistenceChannel": "1.2.3",
"Microsoft.ApplicationInsights.WindowsApps": "1.1.1",
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
"Win2D.uwp": "1.13.0"
"Microsoft.NETCore.UniversalWindowsPlatform": "5.1.0",
"Win2D.uwp": "1.16.0"
},
"frameworks": {
"uap10.0": {}
Expand Down
File renamed without changes.

0 comments on commit 6e83406

Please sign in to comment.