Added InkCanvas and Parallax effect samples
|
@ -0,0 +1,40 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.22823.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ink", "Ink\Ink.csproj", "{006CF024-5221-401B-BD25-9645B05811BF}"
|
||||
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
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Debug|x64.Build.0 = Debug|x64
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Debug|x86.Build.0 = Debug|x86
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Release|ARM.Build.0 = Release|ARM
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Release|x64.ActiveCfg = Release|x64
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Release|x64.Build.0 = Release|x64
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Release|x64.Deploy.0 = Release|x64
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Release|x86.ActiveCfg = Release|x86
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Release|x86.Build.0 = Release|x86
|
||||
{006CF024-5221-401B-BD25-9645B05811BF}.Release|x86.Deploy.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,18 @@
|
|||
<Application
|
||||
x:Class="Ink.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Ink"
|
||||
xmlns:locator="using:Ink.ViewModels.Base"
|
||||
RequestedTheme="Light">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/Themes/Button.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<locator:ViewModelLocator x:Key="ViewModelLocator"/>
|
||||
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -0,0 +1,102 @@
|
|||
using System;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
namespace Ink
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides application-specific behavior to supplement the default Application class.
|
||||
/// </summary>
|
||||
sealed partial class App : Application
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows tracking page views, exceptions and other telemetry through the Microsoft Application Insights service.
|
||||
/// </summary>
|
||||
public static Microsoft.ApplicationInsights.TelemetryClient TelemetryClient;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the singleton application object. This is the first line of authored code
|
||||
/// executed, and as such is the logical equivalent of main() or WinMain().
|
||||
/// </summary>
|
||||
public App()
|
||||
{
|
||||
TelemetryClient = new Microsoft.ApplicationInsights.TelemetryClient();
|
||||
|
||||
this.InitializeComponent();
|
||||
this.Suspending += OnSuspending;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when the application is launched normally by the end user. Other entry points
|
||||
/// will be used such as when the application is launched to open a specific file.
|
||||
/// </summary>
|
||||
/// <param name="e">Details about the launch request and process.</param>
|
||||
protected override void OnLaunched(LaunchActivatedEventArgs e)
|
||||
{
|
||||
|
||||
#if DEBUG
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
{
|
||||
this.DebugSettings.EnableFrameRateCounter = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
Frame rootFrame = Window.Current.Content as Frame;
|
||||
|
||||
// Do not repeat app initialization when the Window already has content,
|
||||
// just ensure that the window is active
|
||||
if (rootFrame == null)
|
||||
{
|
||||
// Create a Frame to act as the navigation context and navigate to the first page
|
||||
rootFrame = new Frame();
|
||||
|
||||
rootFrame.NavigationFailed += OnNavigationFailed;
|
||||
|
||||
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
|
||||
{
|
||||
//TODO: Load state from previously suspended application
|
||||
}
|
||||
|
||||
// Place the frame in the current Window
|
||||
Window.Current.Content = rootFrame;
|
||||
}
|
||||
|
||||
if (rootFrame.Content == null)
|
||||
{
|
||||
// When the navigation stack isn't restored navigate to the first page,
|
||||
// configuring the new page by passing required information as a navigation
|
||||
// parameter
|
||||
rootFrame.Navigate(typeof(InkView), e.Arguments);
|
||||
}
|
||||
// Ensure the current window is active
|
||||
Window.Current.Activate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when Navigation to a certain page fails
|
||||
/// </summary>
|
||||
/// <param name="sender">The Frame which failed navigation</param>
|
||||
/// <param name="e">Details about the navigation failure</param>
|
||||
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
|
||||
{
|
||||
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when application execution is being suspended. Application state is saved
|
||||
/// without knowing whether the application will be terminated or resumed with the contents
|
||||
/// of memory still intact.
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the suspend request.</param>
|
||||
/// <param name="e">Details about the suspend request.</param>
|
||||
private void OnSuspending(object sender, SuspendingEventArgs e)
|
||||
{
|
||||
var deferral = e.SuspendingOperation.GetDeferral();
|
||||
//TODO: Save application state and stop any background activity
|
||||
deferral.Complete();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings">
|
||||
<!--
|
||||
Learn more about Application Insights configuration with ApplicationInsights.config here:
|
||||
http://go.microsoft.com/fwlink/?LinkID=513840
|
||||
|
||||
Note: If not present, please add <InstrumentationKey>Your Key</InstrumentationKey> to the top of this file.
|
||||
-->
|
||||
<TelemetryModules>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule, Microsoft.ApplicationInsights"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.Windows.SessionTelemetryModule, Microsoft.ApplicationInsights.Extensibility.Windows"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.Windows.PageViewTelemetryModule, Microsoft.ApplicationInsights.Extensibility.Windows"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.Windows.UnhandledExceptionTelemetryModule, Microsoft.ApplicationInsights.Extensibility.Windows"/>
|
||||
</TelemetryModules>
|
||||
<TelemetryChannel Type="Microsoft.ApplicationInsights.Channel.PersistenceChannel, Microsoft.ApplicationInsights.PersistenceChannel"/>
|
||||
<ContextInitializers>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.ComponentContextInitializer, Microsoft.ApplicationInsights"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.DeviceContextInitializer, Microsoft.ApplicationInsights"/>
|
||||
</ContextInitializers>
|
||||
<TelemetryInitializers>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.Windows.UserContextInitializer, Microsoft.ApplicationInsights.Extensibility.Windows"/>
|
||||
</TelemetryInitializers>
|
||||
</ApplicationInsights>
|
После Ширина: | Высота: | Размер: 801 B |
После Ширина: | Высота: | Размер: 329 B |
После Ширина: | Высота: | Размер: 2.1 KiB |
После Ширина: | Высота: | Размер: 429 B |
После Ширина: | Высота: | Размер: 2.1 KiB |
|
@ -0,0 +1,152 @@
|
|||
namespace Ink.Behaviors
|
||||
{
|
||||
using Models;
|
||||
using System;
|
||||
using Windows.Foundation;
|
||||
using Windows.UI.Input.Inking;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Media;
|
||||
|
||||
public static class InkBehavior
|
||||
{
|
||||
public static SolidColorBrush GetPenColor(DependencyObject obj)
|
||||
{
|
||||
return (SolidColorBrush)obj.GetValue(PenColorProperty);
|
||||
}
|
||||
|
||||
public static void SetPenColor(DependencyObject obj, SolidColorBrush value)
|
||||
{
|
||||
obj.SetValue(PenColorProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty PenColorProperty =
|
||||
DependencyProperty.RegisterAttached("PenColor", typeof(SolidColorBrush),
|
||||
typeof(InkBehavior), new PropertyMetadata(null,
|
||||
PenColor));
|
||||
|
||||
private static void PenColor(DependencyObject d,
|
||||
DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
InkCanvas ink = d as InkCanvas;
|
||||
if (ink == null) return;
|
||||
|
||||
InkDrawingAttributes drawingAttributes = ink.InkPresenter.CopyDefaultDrawingAttributes();
|
||||
var brush = e.NewValue as SolidColorBrush;
|
||||
drawingAttributes.Color = brush.Color;
|
||||
|
||||
ink.InkPresenter.UpdateDefaultDrawingAttributes(drawingAttributes);
|
||||
}
|
||||
|
||||
public static int GetPenSize(DependencyObject obj)
|
||||
{
|
||||
return (int)obj.GetValue(PenSizeProperty);
|
||||
}
|
||||
|
||||
public static void SetPenSize(DependencyObject obj, int value)
|
||||
{
|
||||
obj.SetValue(PenSizeProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty PenSizeProperty =
|
||||
DependencyProperty.RegisterAttached("PenSize", typeof(int),
|
||||
typeof(InkBehavior), new PropertyMetadata(null,
|
||||
PenSize));
|
||||
|
||||
private static void PenSize(DependencyObject d,
|
||||
DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
InkCanvas ink = d as InkCanvas;
|
||||
if (ink == null) return;
|
||||
|
||||
InkDrawingAttributes drawingAttributes = ink.InkPresenter.CopyDefaultDrawingAttributes();
|
||||
var size = Convert.ToInt32(e.NewValue);
|
||||
drawingAttributes.Size = new Size(size, size);
|
||||
|
||||
ink.InkPresenter.UpdateDefaultDrawingAttributes(drawingAttributes);
|
||||
}
|
||||
|
||||
public static PenType GetPenType(DependencyObject obj)
|
||||
{
|
||||
return (PenType)obj.GetValue(PenTypeProperty);
|
||||
}
|
||||
|
||||
public static void SetPenType(DependencyObject obj, PenType value)
|
||||
{
|
||||
obj.SetValue(PenTypeProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty PenTypeProperty =
|
||||
DependencyProperty.RegisterAttached("PenType", typeof(PenType),
|
||||
typeof(InkBehavior), new PropertyMetadata(null,
|
||||
PenTypeChanged));
|
||||
|
||||
private static void PenTypeChanged(DependencyObject d,
|
||||
DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
InkCanvas ink = d as InkCanvas;
|
||||
if (ink == null) return;
|
||||
|
||||
InkDrawingAttributes drawingAttributes = ink.InkPresenter.CopyDefaultDrawingAttributes();
|
||||
|
||||
var penType = e.NewValue as PenType?;
|
||||
|
||||
if (penType == null)
|
||||
return;
|
||||
|
||||
switch (penType)
|
||||
{
|
||||
case PenType.Ballpoint:
|
||||
drawingAttributes.PenTip = PenTipShape.Circle;
|
||||
drawingAttributes.DrawAsHighlighter = false;
|
||||
drawingAttributes.PenTipTransform = System.Numerics.Matrix3x2.Identity;
|
||||
break;
|
||||
case PenType.Calligraphy:
|
||||
drawingAttributes.PenTip = PenTipShape.Rectangle;
|
||||
drawingAttributes.DrawAsHighlighter = true;
|
||||
drawingAttributes.PenTipTransform = System.Numerics.Matrix3x2.Identity;
|
||||
break;
|
||||
case PenType.Highlighter:
|
||||
drawingAttributes.PenTip = PenTipShape.Rectangle;
|
||||
drawingAttributes.DrawAsHighlighter = false;
|
||||
|
||||
// Set a 45 degree rotation on the pen tip
|
||||
double radians = 45.0 * Math.PI / 180;
|
||||
drawingAttributes.PenTipTransform = System.Numerics.Matrix3x2.CreateRotation((float)radians);
|
||||
break;
|
||||
}
|
||||
|
||||
ink.InkPresenter.UpdateDefaultDrawingAttributes(drawingAttributes);
|
||||
}
|
||||
|
||||
public static bool GetIsClear(DependencyObject obj)
|
||||
{
|
||||
return (bool)obj.GetValue(IsClearProperty);
|
||||
}
|
||||
|
||||
public static void SetIsClear(DependencyObject obj, bool value)
|
||||
{
|
||||
obj.SetValue(IsClearProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty IsClearProperty =
|
||||
DependencyProperty.RegisterAttached("IsClear", typeof(bool),
|
||||
typeof(InkBehavior), new PropertyMetadata(null,
|
||||
IsClearChanged));
|
||||
|
||||
private static void IsClearChanged(DependencyObject d,
|
||||
DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
InkCanvas ink = d as InkCanvas;
|
||||
if (ink == null) return;
|
||||
|
||||
var isClear = e.NewValue as bool?;
|
||||
|
||||
if (isClear.HasValue && isClear.Value)
|
||||
{
|
||||
ink.InkPresenter.StrokeContainer.Clear();
|
||||
SetIsClear(ink, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,196 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProjectGuid>{006CF024-5221-401B-BD25-9645B05811BF}</ProjectGuid>
|
||||
<OutputType>AppContainerExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Ink</RootNamespace>
|
||||
<AssemblyName>Ink</AssemblyName>
|
||||
<DefaultLanguage>es-ES</DefaultLanguage>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion>10.0.10069.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.10069.0</TargetPlatformMinVersion>
|
||||
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
|
||||
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<PackageCertificateKeyFile>Ink_TemporaryKey.pfx</PackageCertificateKeyFile>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\ARM\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>ARM</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
|
||||
<OutputPath>bin\ARM\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>ARM</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UAP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Behaviors\InkBehavior.cs" />
|
||||
<Compile Include="Models\PenType.cs" />
|
||||
<Compile Include="ViewModels\Base\DelegateCommand.cs" />
|
||||
<Compile Include="ViewModels\Base\DelegateCommandAsync.cs" />
|
||||
<Compile Include="ViewModels\Base\ViewModelBase.cs" />
|
||||
<Compile Include="ViewModels\Base\ViewModelLocator.cs" />
|
||||
<Compile Include="ViewModels\InkViewModel.cs" />
|
||||
<Compile Include="Views\Base\PageBase.cs" />
|
||||
<Compile Include="Views\InkView.xaml.cs">
|
||||
<DependentUpon>InkView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</AppxManifest>
|
||||
<None Include="ApplicationInsights.config" />
|
||||
<None Include="Ink_TemporaryKey.pfx" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Properties\Default.rd.xml" />
|
||||
<Content Include="Assets\Logo.scale-100.png" />
|
||||
<Content Include="Assets\SmallLogo.scale-100.png" />
|
||||
<Content Include="Assets\SplashScreen.scale-100.png" />
|
||||
<Content Include="Assets\StoreLogo.scale-100.png" />
|
||||
<Content Include="Assets\WideLogo.scale-100.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="Themes\Button.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Page>
|
||||
<Page Include="Views\InkView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.ApplicationInsights, Version=0.14.3.177, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.0.14.3-build00177\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ApplicationInsights.Extensibility.Windows, Version=0.14.3.177, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.WindowsApps.0.14.3-build00177\lib\win81\Microsoft.ApplicationInsights.Extensibility.Windows.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ApplicationInsights.PersistenceChannel, Version=0.14.3.186, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.PersistenceChannel.0.14.3-build00177\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.PersistenceChannel.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Practices.Unity, Version=3.5.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Unity.3.5.1405-prerelease\lib\win8\Microsoft.Practices.Unity.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Practices.Unity.RegistrationByConvention, Version=3.5.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Unity.3.5.1405-prerelease\lib\win8\Microsoft.Practices.Unity.RegistrationByConvention.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics.Vectors.WindowsRuntime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.0.0\lib\win8\System.Numerics.Vectors.WindowsRuntime.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<Import Project="..\packages\Microsoft.Diagnostics.Tracing.EventSource.Redist.1.1.16-beta\build\portable-net45+win8+wpa81\Microsoft.Diagnostics.Tracing.EventSource.Redist.targets" Condition="Exists('..\packages\Microsoft.Diagnostics.Tracing.EventSource.Redist.1.1.16-beta\build\portable-net45+win8+wpa81\Microsoft.Diagnostics.Tracing.EventSource.Redist.targets')" />
|
||||
<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.Diagnostics.Tracing.EventSource.Redist.1.1.16-beta\build\portable-net45+win8+wpa81\Microsoft.Diagnostics.Tracing.EventSource.Redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Diagnostics.Tracing.EventSource.Redist.1.1.16-beta\build\portable-net45+win8+wpa81\Microsoft.Diagnostics.Tracing.EventSource.Redist.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.ApplicationInsights.0.14.3-build00177\build\portable-win81+wpa81\Microsoft.ApplicationInsights.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ApplicationInsights.0.14.3-build00177\build\portable-win81+wpa81\Microsoft.ApplicationInsights.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Microsoft.ApplicationInsights.0.14.3-build00177\build\portable-win81+wpa81\Microsoft.ApplicationInsights.targets" Condition="Exists('..\packages\Microsoft.ApplicationInsights.0.14.3-build00177\build\portable-win81+wpa81\Microsoft.ApplicationInsights.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,9 @@
|
|||
namespace Ink.Models
|
||||
{
|
||||
public enum PenType
|
||||
{
|
||||
Ballpoint,
|
||||
Highlighter,
|
||||
Calligraphy
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?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="9f528f3f-e949-405f-9ac6-90cc1f2c9afe"
|
||||
Publisher="CN=Javier"
|
||||
Version="1.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="9f528f3f-e949-405f-9ac6-90cc1f2c9afe" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>Ink</DisplayName>
|
||||
<PublisherDisplayName>Javier</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10069.0" MaxVersionTested="10.0.10069.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App"
|
||||
Executable="$targetnametoken$.exe"
|
||||
EntryPoint="Ink.App">
|
||||
<uap:VisualElements
|
||||
DisplayName="Ink"
|
||||
Square150x150Logo="Assets\Logo.png"
|
||||
Square44x44Logo="Assets\SmallLogo.png"
|
||||
Description="Ink"
|
||||
BackgroundColor="#464646">
|
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
</Capabilities>
|
||||
</Package>
|
|
@ -0,0 +1,29 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Ink")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Ink")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: ComVisible(false)]
|
|
@ -0,0 +1,31 @@
|
|||
<!--
|
||||
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
|
||||
developers. However, you can modify these parameters to modify the behavior of the .NET Native
|
||||
optimizer.
|
||||
|
||||
Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919
|
||||
|
||||
To fully enable reflection for App1.MyClass and all of its public/private members
|
||||
<Type Name="App1.MyClass" Dynamic="Required All"/>
|
||||
|
||||
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
|
||||
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
|
||||
|
||||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Seralize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
An Assembly element with Name="*Application*" applies to all assemblies in
|
||||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
|
||||
|
||||
</Application>
|
||||
</Directives>
|
|
@ -0,0 +1,59 @@
|
|||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="ColorButtonStyle" TargetType="Button">
|
||||
<Setter Property="MinWidth" Value="28"/>
|
||||
<Setter Property="MinHeight" Value="28"/>
|
||||
<Setter Property="Width" Value="28"/>
|
||||
<Setter Property="Height" Value="28"/>
|
||||
<Setter Property="Margin" Value="5, 0"/>
|
||||
<Setter Property="FontSize" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Grid Background="Transparent">
|
||||
<Grid Background="Transparent">
|
||||
<Border x:Name="ColorButtonOuterBorder"
|
||||
BorderThickness="1"
|
||||
BorderBrush="Orange"
|
||||
Background="Transparent">
|
||||
<Border
|
||||
BorderBrush="LightGray"
|
||||
BorderThickness="1"
|
||||
Background="{TemplateBinding Background}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal"/>
|
||||
<VisualState x:Name="PointerOver">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ColorButtonOuterBorder" Storyboard.TargetProperty="BorderThickness">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="2"/>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed"/>
|
||||
<VisualState x:Name="Disabled"/>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="FocusStates">
|
||||
<VisualState x:Name="Focused">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ColorButtonOuterBorder" Storyboard.TargetProperty="BorderThickness">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="2"/>
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Unfocused"/>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
|
@ -0,0 +1,131 @@
|
|||
using System;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Ink.ViewModels.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// This class allows us to delegate command execution to viewmodels.
|
||||
/// </summary>
|
||||
public class DelegateCommand : ICommand
|
||||
{
|
||||
private readonly Action _execute;
|
||||
private readonly Func<bool> _canExecute;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor not using canExecute.
|
||||
/// </summary>
|
||||
/// <param name="execute"></param>
|
||||
public DelegateCommand(Action execute) : this(execute, null) { }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor using both execute and canExecute.
|
||||
/// </summary>
|
||||
/// <param name="execute"></param>
|
||||
/// <param name="canExecute"></param>
|
||||
public DelegateCommand(Action execute, Func<bool> canExecute)
|
||||
{
|
||||
_execute = execute;
|
||||
_canExecute = canExecute;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called from XAML to evaluate if the command can be executed.
|
||||
/// </summary>
|
||||
/// <param name="parameter"></param>
|
||||
/// <returns></returns>
|
||||
public bool CanExecute(object parameter)
|
||||
{
|
||||
if (_canExecute != null)
|
||||
return _canExecute();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called from XAML to execute the command.
|
||||
/// </summary>
|
||||
/// <param name="parameter"></param>
|
||||
public void Execute(object parameter)
|
||||
{
|
||||
_execute();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method allow us to force the execution of CanExecute method to reevaluate execution.
|
||||
/// </summary>
|
||||
public void RaiseCanExecuteChanged()
|
||||
{
|
||||
var tmpHandle = CanExecuteChanged;
|
||||
if (tmpHandle != null)
|
||||
tmpHandle(this, new EventArgs());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This event notify XAML controls using the command to reevaluate the CanExecute of it.
|
||||
/// </summary>
|
||||
public event EventHandler CanExecuteChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This class allows us to delegate command execution to viewmodels using a T type as parameter.
|
||||
/// </summary>
|
||||
public class DelegateCommand<T> : ICommand
|
||||
{
|
||||
private readonly Action<T> _execute;
|
||||
private readonly Func<T, bool> _canExecute;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor not using canExecute.
|
||||
/// </summary>
|
||||
/// <param name="execute"></param>
|
||||
public DelegateCommand(Action<T> execute) : this(execute, null) { }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor using both execute and canExecute.
|
||||
/// </summary>
|
||||
/// <param name="execute"></param>
|
||||
/// <param name="canExecute"></param>
|
||||
public DelegateCommand(Action<T> execute, Func<T, bool> canExecute)
|
||||
{
|
||||
_execute = execute;
|
||||
_canExecute = canExecute;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called from XAML to evaluate if the command can be executed.
|
||||
/// </summary>
|
||||
/// <param name="parameter"></param>
|
||||
/// <returns></returns>
|
||||
public bool CanExecute(object parameter)
|
||||
{
|
||||
if (_canExecute != null)
|
||||
return _canExecute((T)parameter);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called from XAML to execute the command.
|
||||
/// </summary>
|
||||
/// <param name="parameter"></param>
|
||||
public void Execute(object parameter)
|
||||
{
|
||||
_execute((T)parameter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method allow us to force the execution of CanExecute method to reevaluate execution.
|
||||
/// </summary>
|
||||
public void RaiseCanExecuteChanged()
|
||||
{
|
||||
var tmpHandle = CanExecuteChanged;
|
||||
if (tmpHandle != null)
|
||||
tmpHandle(this, new EventArgs());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This event notify XAML controls using the command to reevaluate the CanExecute of it.
|
||||
/// </summary>
|
||||
public event EventHandler CanExecuteChanged;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Ink.ViewModels.Base
|
||||
{
|
||||
/// <summary>
|
||||
/// This class allows us to delegate command execution to viewmodels.
|
||||
/// This version of the command allow to use async/await.
|
||||
/// </summary>
|
||||
public class DelegateCommandAsync : ICommand
|
||||
{
|
||||
private readonly Func<Task<bool>> _canExecute;
|
||||
private readonly Func<Task> _execute;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor not using canExecute.
|
||||
/// </summary>
|
||||
/// <param name="execute"></param>
|
||||
public DelegateCommandAsync(Func<Task> execute) : this(execute, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor using both execute and canExecute.
|
||||
/// </summary>
|
||||
/// <param name="execute"></param>
|
||||
/// <param name="canExecute"></param>
|
||||
public DelegateCommandAsync(Func<Task> execute, Func<Task<bool>> canExecute)
|
||||
{
|
||||
_execute = execute;
|
||||
_canExecute = canExecute;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called from XAML to evaluate if the command can be executed.
|
||||
/// </summary>
|
||||
/// <param name="parameter"></param>
|
||||
/// <returns></returns>
|
||||
public bool CanExecute(object parameter)
|
||||
{
|
||||
if (_canExecute != null)
|
||||
return _canExecute().Result;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called from XAML to execute the command.
|
||||
/// </summary>
|
||||
/// <param name="parameter"></param>
|
||||
public void Execute(object parameter)
|
||||
{
|
||||
_execute();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This event notify XAML controls using the command to reevaluate the CanExecute of it.
|
||||
/// </summary>
|
||||
public event EventHandler CanExecuteChanged;
|
||||
|
||||
/// <summary>
|
||||
/// This method allow us to force the execution of CanExecute method to reevaluate execution.
|
||||
/// </summary>
|
||||
public void RaiseCanExecuteChanged()
|
||||
{
|
||||
EventHandler tmpHandle = CanExecuteChanged;
|
||||
if (tmpHandle != null)
|
||||
tmpHandle(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This class allows us to delegate command execution to viewmodels using a T type as parameter.
|
||||
/// </summary>
|
||||
public class DelegateCommandAsync<T> : ICommand
|
||||
{
|
||||
private readonly Func<T, Task<bool>> _canExecute;
|
||||
private readonly Func<T, Task> _execute;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor not using canExecute.
|
||||
/// </summary>
|
||||
/// <param name="execute"></param>
|
||||
public DelegateCommandAsync(Func<T, Task> execute) : this(execute, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor using both execute and canExecute.
|
||||
/// </summary>
|
||||
/// <param name="execute"></param>
|
||||
/// <param name="canExecute"></param>
|
||||
public DelegateCommandAsync(Func<T, Task> execute, Func<T, Task<bool>> canExecute)
|
||||
{
|
||||
_execute = execute;
|
||||
_canExecute = canExecute;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called from XAML to evaluate if the command can be executed.
|
||||
/// </summary>
|
||||
/// <param name="parameter"></param>
|
||||
/// <returns></returns>
|
||||
public bool CanExecute(object parameter)
|
||||
{
|
||||
if (_canExecute != null)
|
||||
return _canExecute((T) parameter).Result;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called from XAML to execute the command.
|
||||
/// </summary>
|
||||
/// <param name="parameter"></param>
|
||||
public void Execute(object parameter)
|
||||
{
|
||||
_execute((T) parameter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This event notify XAML controls using the command to reevaluate the CanExecute of it.
|
||||
/// </summary>
|
||||
public event EventHandler CanExecuteChanged;
|
||||
|
||||
/// <summary>
|
||||
/// This method allow us to force the execution of CanExecute method to reevaluate execution.
|
||||
/// </summary>
|
||||
public void RaiseCanExecuteChanged()
|
||||
{
|
||||
EventHandler tmpHandle = CanExecuteChanged;
|
||||
if (tmpHandle != null)
|
||||
tmpHandle(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
namespace Ink.ViewModels.Base
|
||||
{
|
||||
public abstract class ViewModelBase : INotifyPropertyChanged
|
||||
{
|
||||
private Frame appFrame;
|
||||
private bool isBusy;
|
||||
|
||||
public ViewModelBase()
|
||||
{
|
||||
}
|
||||
|
||||
public Frame AppFrame
|
||||
{
|
||||
get { return appFrame; }
|
||||
}
|
||||
|
||||
public bool IsBusy
|
||||
{
|
||||
get { return isBusy; }
|
||||
set
|
||||
{
|
||||
isBusy = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
public abstract Task OnNavigatedFrom(NavigationEventArgs args);
|
||||
|
||||
public abstract Task OnNavigatedTo(NavigationEventArgs args);
|
||||
|
||||
public void RaisePropertyChanged([CallerMemberName]string propertyName = "")
|
||||
{
|
||||
var Handler = PropertyChanged;
|
||||
if (Handler != null)
|
||||
Handler(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
internal void SetAppFrame(Frame viewFrame)
|
||||
{
|
||||
appFrame = viewFrame;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
namespace Ink.ViewModels.Base
|
||||
{
|
||||
using Microsoft.Practices.Unity;
|
||||
|
||||
public class ViewModelLocator
|
||||
{
|
||||
readonly IUnityContainer _container;
|
||||
|
||||
public ViewModelLocator()
|
||||
{
|
||||
_container = new UnityContainer();
|
||||
|
||||
// ViewModels
|
||||
_container.RegisterType<InkViewModel>();
|
||||
|
||||
}
|
||||
|
||||
public InkViewModel InkViewModel
|
||||
{
|
||||
get { return _container.Resolve<InkViewModel>(); }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
namespace Ink.ViewModels
|
||||
{
|
||||
using System.Threading.Tasks;
|
||||
using Base;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
using System.Windows.Input;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI;
|
||||
using Models;
|
||||
|
||||
public class InkViewModel : ViewModelBase
|
||||
{
|
||||
// Consts
|
||||
private const int DefaultPenSize = 2;
|
||||
// Variables
|
||||
private SolidColorBrush _penColor;
|
||||
private int _penSize;
|
||||
private int _selectedPenSize;
|
||||
private PenType _penType;
|
||||
private int _selectedPenType;
|
||||
private bool _isClear;
|
||||
|
||||
// Commands
|
||||
private ICommand _colorCommand;
|
||||
private ICommand _clearCommand;
|
||||
|
||||
public InkViewModel()
|
||||
{
|
||||
// Init
|
||||
PenColor = new SolidColorBrush(Colors.Black);
|
||||
PenSize = 2;
|
||||
SelectedPenType = 0;
|
||||
SelectedPenSize = 1;
|
||||
}
|
||||
|
||||
public SolidColorBrush PenColor
|
||||
{
|
||||
get { return _penColor; }
|
||||
set
|
||||
{
|
||||
_penColor = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public int PenSize
|
||||
{
|
||||
get { return _penSize; }
|
||||
set
|
||||
{
|
||||
_penSize = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public int SelectedPenSize
|
||||
{
|
||||
get { return _selectedPenSize; }
|
||||
set
|
||||
{
|
||||
_selectedPenSize = value;
|
||||
PenSize = DefaultPenSize * (_selectedPenSize + 1);
|
||||
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public PenType PenType
|
||||
{
|
||||
get { return _penType; }
|
||||
set
|
||||
{
|
||||
_penType = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public int SelectedPenType
|
||||
{
|
||||
get { return _selectedPenType; }
|
||||
set
|
||||
{
|
||||
_selectedPenType = value;
|
||||
|
||||
switch (_selectedPenType)
|
||||
{
|
||||
case 0:
|
||||
PenType = PenType.Ballpoint;
|
||||
break;
|
||||
case 1:
|
||||
PenType = PenType.Highlighter;
|
||||
break;
|
||||
case 2:
|
||||
PenType = PenType.Calligraphy;
|
||||
break;
|
||||
}
|
||||
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsClear
|
||||
{
|
||||
get { return _isClear; }
|
||||
set
|
||||
{
|
||||
_isClear = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public override Task OnNavigatedFrom(NavigationEventArgs args)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public override Task OnNavigatedTo(NavigationEventArgs args)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public ICommand ColorCommand
|
||||
{
|
||||
get { return _colorCommand = _colorCommand ?? new DelegateCommand<string>(ColorCommandExecute); }
|
||||
}
|
||||
|
||||
public ICommand ClearCommand
|
||||
{
|
||||
get { return _clearCommand = _clearCommand ?? new DelegateCommand(ClearCommandExecute); }
|
||||
}
|
||||
|
||||
private void ColorCommandExecute(string color)
|
||||
{
|
||||
switch (color)
|
||||
{
|
||||
case "Black":
|
||||
PenColor = new SolidColorBrush(Colors.Black);
|
||||
break;
|
||||
case "Blue":
|
||||
PenColor = new SolidColorBrush(Colors.Blue);
|
||||
break;
|
||||
case "Green":
|
||||
PenColor = new SolidColorBrush(Colors.Green);
|
||||
break;
|
||||
case "Red":
|
||||
PenColor = new SolidColorBrush(Colors.Red);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearCommandExecute()
|
||||
{
|
||||
IsClear = true;
|
||||
IsClear = false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
namespace Ink.Views.Base
|
||||
{
|
||||
using ViewModels.Base;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
public class PageBase : Page
|
||||
{
|
||||
private ViewModelBase _vm;
|
||||
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
_vm = (ViewModelBase)this.DataContext;
|
||||
_vm.SetAppFrame(this.Frame);
|
||||
_vm.OnNavigatedTo(e);
|
||||
}
|
||||
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedFrom(e);
|
||||
_vm.OnNavigatedFrom(e);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
<base:PageBase
|
||||
x:Class="Ink.InkView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Ink"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:base="using:Ink.Views.Base"
|
||||
xmlns:behaviors="using:Ink.Behaviors"
|
||||
mc:Ignorable="d"
|
||||
DataContext="{Binding Path=InkViewModel, Source={StaticResource ViewModelLocator}}">
|
||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel
|
||||
Margin="0,0,0,10">
|
||||
<TextBlock Text="Info:"/>
|
||||
<TextBlock
|
||||
TextWrapping="Wrap">
|
||||
En este ejemplo utilizamos todas las capacidades básicas del control InkCanvas con MVVM.
|
||||
<LineBreak/>
|
||||
NOTA: Para dinujar utiliza un pen, el ratón o los dedos en pantalla táctil.
|
||||
<LineBreak/>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
Margin="0,5">
|
||||
<StackPanel Orientation="Horizontal"
|
||||
HorizontalAlignment="Left">
|
||||
<TextBlock
|
||||
Text="Pen Type:"
|
||||
VerticalAlignment="Center"
|
||||
Margin="5, 0"/>
|
||||
<ComboBox
|
||||
Width="150"
|
||||
Margin="5, 0"
|
||||
SelectedIndex="{Binding SelectedPenType, Mode=TwoWay}">
|
||||
<ComboBoxItem Content="Ballpoint"/>
|
||||
<ComboBoxItem Content="Highlighter"/>
|
||||
<ComboBoxItem Content="Calligraphy"/>
|
||||
</ComboBox>
|
||||
<TextBlock
|
||||
Text="Pen Thickness:"
|
||||
Margin="5, 0"/>
|
||||
<ComboBox
|
||||
Width="150"
|
||||
Margin="5, 0"
|
||||
SelectedIndex="{Binding SelectedPenSize, Mode=TwoWay}">
|
||||
<ComboBoxItem Content="Smallest"/>
|
||||
<ComboBoxItem Content="Small"/>
|
||||
<ComboBoxItem Content="Medium"/>
|
||||
<ComboBoxItem Content="Large"/>
|
||||
<ComboBoxItem Content="Largest"/>
|
||||
</ComboBox>
|
||||
<TextBlock
|
||||
Text="Color:"
|
||||
VerticalAlignment="Center"
|
||||
Margin="5, 0"/>
|
||||
<Button Background="Black"
|
||||
Style="{StaticResource ColorButtonStyle}"
|
||||
CommandParameter="Black"
|
||||
Command="{Binding ColorCommand}" />
|
||||
<Button Background="Red"
|
||||
Style="{StaticResource ColorButtonStyle}"
|
||||
CommandParameter="Red"
|
||||
Command="{Binding ColorCommand}" />
|
||||
<Button Background="Blue"
|
||||
Style="{StaticResource ColorButtonStyle}"
|
||||
CommandParameter="Blue"
|
||||
Command="{Binding ColorCommand}" />
|
||||
<Button Background="Green"
|
||||
Style="{StaticResource ColorButtonStyle}"
|
||||
CommandParameter="Green"
|
||||
Command="{Binding ColorCommand}" />
|
||||
<StackPanel
|
||||
Orientation="Horizontal"
|
||||
Margin="50, 0">
|
||||
<Button Content="Clear"
|
||||
Command="{Binding ClearCommand}"
|
||||
Margin="5, 0"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Grid
|
||||
Background="LightGray"
|
||||
Margin="10">
|
||||
<!-- InkCanvas -->
|
||||
<InkCanvas
|
||||
x:Name="Ink"
|
||||
behaviors:InkBehavior.PenColor="{Binding PenColor}"
|
||||
behaviors:InkBehavior.PenSize="{Binding PenSize}"
|
||||
behaviors:InkBehavior.PenType="{Binding PenType}"
|
||||
behaviors:InkBehavior.IsClear="{Binding IsClear, Mode=TwoWay}"
|
||||
Width="1024"
|
||||
Height="768" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</base:PageBase>
|
|
@ -0,0 +1,20 @@
|
|||
namespace Ink
|
||||
{
|
||||
using Views.Base;
|
||||
using Windows.UI.Input.Inking;
|
||||
|
||||
public sealed partial class InkView : PageBase
|
||||
{
|
||||
public InkView()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
|
||||
InkDrawingAttributes drawingAttributes = new InkDrawingAttributes();
|
||||
drawingAttributes.IgnorePressure = false;
|
||||
drawingAttributes.FitToCurve = true;
|
||||
|
||||
Ink.InkPresenter.UpdateDefaultDrawingAttributes(drawingAttributes);
|
||||
Ink.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Mouse | Windows.UI.Core.CoreInputDeviceTypes.Pen;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings">
|
||||
<!--
|
||||
Learn more about Application Insights configuration with ApplicationInsights.config here:
|
||||
http://go.microsoft.com/fwlink/?LinkID=513840
|
||||
|
||||
Note: If not present, please add <InstrumentationKey>Your Key</InstrumentationKey> to the top of this file.
|
||||
-->
|
||||
<TelemetryModules>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule, Microsoft.ApplicationInsights" />
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.Windows.SessionTelemetryModule, Microsoft.ApplicationInsights.Extensibility.Windows" />
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.Windows.PageViewTelemetryModule, Microsoft.ApplicationInsights.Extensibility.Windows" />
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.Windows.UnhandledExceptionTelemetryModule, Microsoft.ApplicationInsights.Extensibility.Windows" />
|
||||
</TelemetryModules>
|
||||
<TelemetryChannel Type="Microsoft.ApplicationInsights.Channel.PersistenceChannel, Microsoft.ApplicationInsights.PersistenceChannel">
|
||||
<DeveloperMode>true</DeveloperMode>
|
||||
</TelemetryChannel>
|
||||
<ContextInitializers>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.ComponentContextInitializer, Microsoft.ApplicationInsights" />
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.DeviceContextInitializer, Microsoft.ApplicationInsights" />
|
||||
</ContextInitializers>
|
||||
<TelemetryInitializers>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.Windows.UserContextInitializer, Microsoft.ApplicationInsights.Extensibility.Windows" />
|
||||
</TelemetryInitializers>
|
||||
</ApplicationInsights>
|
|
@ -0,0 +1,47 @@
|
|||
<?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 build" xmlns:build="http://schemas.microsoft.com/developer/appx/2015/build">
|
||||
<!--
|
||||
ESTE ARCHIVO DE MANIFIESTO DEL PAQUETE SE GENERA MEDIANTE EL PROCESO DE COMPILACIÓN.
|
||||
|
||||
Los cambios realizados en el archivo se perderán al regenerarlo. Para corregir los errores de este archivo, edite el archivo de origen .appxmanifest.
|
||||
|
||||
Para obtener más información acerca de los archivos de manifiesto del paquete, vea http://go.microsoft.com/fwlink/?LinkID=241727
|
||||
-->
|
||||
<Identity Name="9f528f3f-e949-405f-9ac6-90cc1f2c9afe" Publisher="CN=Javier" Version="1.0.0.0" ProcessorArchitecture="x86" />
|
||||
<mp:PhoneIdentity PhoneProductId="9f528f3f-e949-405f-9ac6-90cc1f2c9afe" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
|
||||
<Properties>
|
||||
<DisplayName>Ink</DisplayName>
|
||||
<PublisherDisplayName>Javier</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10069.0" MaxVersionTested="10.0.10069.0" />
|
||||
<PackageDependency Name="Microsoft.NET.CoreRuntime.1.0" MinVersion="1.0.22816.1" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
|
||||
</Dependencies>
|
||||
<Resources>
|
||||
<Resource Language="ES-ES" />
|
||||
</Resources>
|
||||
<Applications>
|
||||
<Application Id="App" Executable="CoreRuntime\Ink.exe" EntryPoint="Ink.App">
|
||||
<uap:VisualElements DisplayName="Ink" Square150x150Logo="Assets\Logo.png" Square44x44Logo="Assets\SmallLogo.png" Description="Ink" BackgroundColor="#464646">
|
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
</Capabilities>
|
||||
<build:Metadata>
|
||||
<build:Item Name="TargetFrameworkMoniker" Value=".NETCore,Version=v4.5.1" />
|
||||
<build:Item Name="VisualStudio" Version="14.0" />
|
||||
<build:Item Name="VisualStudioEdition" Value="Microsoft Visual Studio Enterprise 2015 RC" />
|
||||
<build:Item Name="OperatingSystem" Version="10.0.10074.0 (fbl_impressive.150424-1350)" />
|
||||
<build:Item Name="Microsoft.Build.AppxPackage.dll" Version="14.0.22823.1" />
|
||||
<build:Item Name="ProjectGUID" Value="{006CF024-5221-401B-BD25-9645B05811BF}" />
|
||||
<build:Item Name="OptimizingToolset" Value="None" />
|
||||
<build:Item Name="TargetRuntime" Value="Managed" />
|
||||
<build:Item Name="ilc.exe" Version="1.0.22816.00 built by: PROJECTNREL" />
|
||||
<build:Item Name="Microsoft.Windows.UI.Xaml.Build.Tasks.dll" Version="14.0.22823.1" />
|
||||
<build:Item Name="MakePri.exe" Version="10.0.10069.0 (fbl_impressive.150419-0022)" />
|
||||
</build:Metadata>
|
||||
</Package>
|
После Ширина: | Высота: | Размер: 801 B |
После Ширина: | Высота: | Размер: 329 B |
После Ширина: | Высота: | Размер: 2.1 KiB |
После Ширина: | Высота: | Размер: 429 B |
После Ширина: | Высота: | Размер: 2.1 KiB |
Двоичные данные
Ink/Ink/bin/x86/Debug/AppX/Ink.csproj.AppLocalNetFX.GenerateResource.Cache
Normal file
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Roots >
|
||||
<Roots.PropertyPathNames>
|
||||
<RootPropertyPathName Name="InkViewModel" />
|
||||
<RootPropertyPathName Name="PenColor" />
|
||||
<RootPropertyPathName Name="PenSize" />
|
||||
<RootPropertyPathName Name="PenType" />
|
||||
<RootPropertyPathName Name="IsClear" />
|
||||
<RootPropertyPathName Name="ClearCommand" />
|
||||
<RootPropertyPathName Name="ColorCommand" />
|
||||
<RootPropertyPathName Name="SelectedPenSize" />
|
||||
<RootPropertyPathName Name="SelectedPenType" />
|
||||
</Roots.PropertyPathNames>
|
||||
<Roots.RootTypes>
|
||||
<RootType FullName="Windows.UI.Xaml.Application">
|
||||
<RootProperty Name="RequestedTheme" />
|
||||
<RootProperty Name="Resources" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.ResourceDictionary">
|
||||
<RootProperty Name="MergedDictionaries" />
|
||||
<RootProperty Name="Source" />
|
||||
</RootType>
|
||||
<RootType FullName="Ink.ViewModels.Base.ViewModelLocator" />
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.Button">
|
||||
<RootProperty Name="Background" />
|
||||
<RootProperty Name="Style" />
|
||||
<RootProperty Name="CommandParameter" />
|
||||
<RootProperty Name="Command" />
|
||||
<RootProperty Name="Content" />
|
||||
<RootProperty Name="Margin" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.FrameworkElement">
|
||||
<RootProperty Name="MinWidth" />
|
||||
<RootProperty Name="MinHeight" />
|
||||
<RootProperty Name="Width" />
|
||||
<RootProperty Name="Height" />
|
||||
<RootProperty Name="Margin" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.Control">
|
||||
<RootProperty Name="FontSize" />
|
||||
<RootProperty Name="Padding" />
|
||||
<RootProperty Name="Template" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Setter">
|
||||
<RootProperty Name="Property" />
|
||||
<RootProperty Name="Value" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.ControlTemplate">
|
||||
<RootProperty Name="TargetType" />
|
||||
<RootProperty Name="Template" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.Grid">
|
||||
<RootProperty Name="Background" />
|
||||
<RootProperty Name="Children" />
|
||||
<RootProperty Name="RowDefinitions" />
|
||||
<RootProperty Name="Margin" />
|
||||
<RootMethod Name="GetRow" />
|
||||
<RootMethod Name="SetRow" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.VisualStateManager">
|
||||
<RootMethod Name="GetVisualStateGroups" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.Border">
|
||||
<RootProperty Name="BorderThickness" />
|
||||
<RootProperty Name="BorderBrush" />
|
||||
<RootProperty Name="Background" />
|
||||
<RootProperty Name="Child" />
|
||||
</RootType>
|
||||
<RootType FullName="Microsoft.Xaml.DirectUI.ProxyTypes.TemplateBindingExtension" />
|
||||
<RootType FullName="Windows.UI.Xaml.VisualStateGroup">
|
||||
<RootProperty Name="States" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.VisualState">
|
||||
<RootProperty Name="Storyboard" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Media.Animation.Storyboard">
|
||||
<RootProperty Name="Children" />
|
||||
<RootMethod Name="GetTargetName" />
|
||||
<RootMethod Name="SetTargetName" />
|
||||
<RootMethod Name="GetTargetProperty" />
|
||||
<RootMethod Name="SetTargetProperty" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Media.Animation.ObjectAnimationUsingKeyFrames">
|
||||
<RootProperty Name="KeyFrames" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Media.Animation.DiscreteObjectKeyFrame">
|
||||
<RootProperty Name="KeyTime" />
|
||||
<RootProperty Name="Value" />
|
||||
</RootType>
|
||||
<RootType FullName="Ink.Views.Base.PageBase">
|
||||
<RootProperty Name="DataContext" />
|
||||
<RootProperty Name="Content" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Data.Binding">
|
||||
<RootProperty Name="Path" />
|
||||
<RootProperty Name="Source" />
|
||||
<RootProperty Name="Mode" />
|
||||
</RootType>
|
||||
<RootType FullName="Microsoft.Xaml.DirectUI.ProxyTypes.StaticResourceExtension" />
|
||||
<RootType FullName="Microsoft.Xaml.DirectUI.ProxyTypes.ThemeResourceExtension" />
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.RowDefinition">
|
||||
<RootProperty Name="Height" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.StackPanel">
|
||||
<RootProperty Name="Margin" />
|
||||
<RootProperty Name="Children" />
|
||||
<RootProperty Name="HorizontalAlignment" />
|
||||
<RootProperty Name="VerticalAlignment" />
|
||||
<RootProperty Name="Orientation" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.InkCanvas">
|
||||
<RootProperty Name="Width" />
|
||||
<RootProperty Name="Height" />
|
||||
</RootType>
|
||||
<RootType FullName="Ink.Behaviors.InkBehavior">
|
||||
<RootMethod Name="GetPenColor" />
|
||||
<RootMethod Name="SetPenColor" />
|
||||
<RootMethod Name="GetPenSize" />
|
||||
<RootMethod Name="SetPenSize" />
|
||||
<RootMethod Name="GetPenType" />
|
||||
<RootMethod Name="SetPenType" />
|
||||
<RootMethod Name="GetIsClear" />
|
||||
<RootMethod Name="SetIsClear" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.TextBlock">
|
||||
<RootProperty Name="Text" />
|
||||
<RootProperty Name="VerticalAlignment" />
|
||||
<RootProperty Name="Margin" />
|
||||
<RootProperty Name="TextWrapping" />
|
||||
<RootProperty Name="Inlines" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.ComboBox">
|
||||
<RootProperty Name="Width" />
|
||||
<RootProperty Name="Margin" />
|
||||
<RootProperty Name="SelectedIndex" />
|
||||
<RootProperty Name="Items" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Controls.ComboBoxItem">
|
||||
<RootProperty Name="Content" />
|
||||
</RootType>
|
||||
<RootType FullName="Windows.UI.Xaml.Documents.LineBreak" />
|
||||
<RootType FullName="Ink.InkView" />
|
||||
</Roots.RootTypes>
|
||||
</Roots>
|
Двоичные данные
Ink/Ink/bin/x86/Debug/AppX/Microsoft.ApplicationInsights.Extensibility.Windows.dll
Normal file
Двоичные данные
Ink/Ink/bin/x86/Debug/AppX/Microsoft.ApplicationInsights.PersistenceChannel.dll
Normal file
Двоичные данные
Ink/Ink/bin/x86/Debug/AppX/Microsoft.Diagnostics.Tracing.EventSource.dll
Normal file
Двоичные данные
Ink/Ink/bin/x86/Debug/AppX/Microsoft.Practices.Unity.RegistrationByConvention.dll
Normal file
|
@ -0,0 +1,31 @@
|
|||
<!--
|
||||
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
|
||||
developers. However, you can modify these parameters to modify the behavior of the .NET Native
|
||||
optimizer.
|
||||
|
||||
Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919
|
||||
|
||||
To fully enable reflection for App1.MyClass and all of its public/private members
|
||||
<Type Name="App1.MyClass" Dynamic="Required All"/>
|
||||
|
||||
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
|
||||
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
|
||||
|
||||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Seralize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
An Assembly element with Name="*Application*" applies to all assemblies in
|
||||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
|
||||
|
||||
</Application>
|
||||
</Directives>
|