Skip to content

Commit

Permalink
Merge pull request #8 from Windows-XAML/master
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
jp-weber committed Nov 2, 2019
2 parents 4197e2a + f5b2b98 commit e304e57
Show file tree
Hide file tree
Showing 39 changed files with 771 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Expand Down Expand Up @@ -158,9 +158,13 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Source\Template10.Behaviors\Template10.Behaviors.csproj">
<Project>{5f2d8407-51c2-401f-b000-0f12670711a5}</Project>
<Name>Template10.Behaviors</Name>
<ProjectReference Include="..\..\Source\Template10.Core.Default\Template10.Core.Default.csproj">
<Project>{b78f70de-00f1-4f16-9c65-9e96609e0d7e}</Project>
<Name>Template10.Core.Default</Name>
</ProjectReference>
<ProjectReference Include="..\..\Source\Template10.Core\Template10.Core.csproj">
<Project>{c246358b-68ae-4cc3-ae50-a2a5cb14cdca}</Project>
<Name>Template10.Core</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Expand Down
6 changes: 6 additions & 0 deletions Samples/Template10.NuGet.FileActivationSample/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<T10:ApplicationBase
x:Class="Template10.NuGet.FileActivationSample.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:T10="using:Template10"
xmlns:local="using:Template10.NuGet.FileActivationSample" />
59 changes: 59 additions & 0 deletions Samples/Template10.NuGet.FileActivationSample/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using System;
using Template10.Navigation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Prism.Ioc;
using System.Threading.Tasks;
using Template10.Ioc;
using Template10.Services;
using Template10.NuGet.FileActivationSample.ViewModels;
using Template10.NuGet.FileActivationSample.Views;
using Windows.ApplicationModel.Activation;
using System.Collections.Generic;
using Windows.Storage;
using System.Linq;

namespace Template10.NuGet.FileActivationSample
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Template10.ApplicationBase
{
private INavigationService _nav;

public App() => InitializeComponent();

public override void RegisterTypes(IContainerRegistry container)
{
container.RegisterView<MainPage, MainPageViewModel>();
container.RegisterView<MarkdownPage, MarkdownPageViewModel>();
container.Register<IDialogService, DialogService>();
}

public override void OnInitialized()
{
var shell = (ShellPage)Container.Resolve(typeof(ShellPage));
var frame = shell.Frame = new Frame();
Window.Current.Content = shell;
Window.Current.Activate();
_nav = NavigationFactory
.Create(frame, Guid.Empty.ToString())
.AttachGestures(Window.Current, Gesture.Back, Gesture.Forward, Gesture.Refresh);
}

public override async Task OnStartAsync(IStartArgs args)
{
switch (args.StartCause)
{
case StartCauses.File when (args.Arguments is FileActivatedEventArgs fileArgs):
var navParams = new NavigationParameters(("file", fileArgs.Files.First()));
await _nav.NavigateAsync(nameof(MarkdownPage), navParams);
break;
default:
await _nav.NavigateAsync(nameof(MainPage));
break;
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions Samples/Template10.NuGet.FileActivationSample/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?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="d1d9c701-6f4f-46ef-bfd8-ab4847e7dba3"
Publisher="CN=daren"
Version="1.0.0.0" />

<mp:PhoneIdentity PhoneProductId="d1d9c701-6f4f-46ef-bfd8-ab4847e7dba3" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

<Properties>
<DisplayName>Template10.NuGet.FileActivationSample</DisplayName>
<PublisherDisplayName>daren</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>

<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>

<Resources>
<Resource Language="x-generate"/>
</Resources>

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="Template10.NuGet.FileActivationSample.App">
<uap:VisualElements
DisplayName="Template10.NuGet.FileActivationSample"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="Template10.NuGet.FileActivationSample"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="template10markdown">
<uap:SupportedFileTypes>
<uap:FileType>.t10md</uap:FileType>
</uap:SupportedFileTypes>
<uap:DisplayName>Template10 Sample Markdown File</uap:DisplayName>
<uap:Logo>Assets\T10 128x128.png</uap:Logo>
<uap:InfoTip>Template10 Sample Markdown File</uap:InfoTip>
</uap:FileTypeAssociation>
</uap:Extension>
</Extensions>
</Application>
</Applications>

<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
Original file line number Diff line number Diff line change
@@ -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("Template10.NuGet.FileActivationSample")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Template10.NuGet.FileActivationSample")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[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)]
Original file line number Diff line number Diff line change
@@ -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 https://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" Serialize="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>
7 changes: 7 additions & 0 deletions Samples/Template10.NuGet.FileActivationSample/Sample.t10md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Sample Markdown File

![T10 Logo Image](https://raw.githubusercontent.com/Windows-XAML/Template10/master/Assets/T10%20128x128.png)

This is a sample T10 Markdown file to demonstrate file association.

You can learn more about Template10 [here](https://github.com/Windows-XAML/Template10/).
Loading

0 comments on commit e304e57

Please sign in to comment.