-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Windows-XAML/master
Merge
- Loading branch information
Showing
39 changed files
with
771 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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; | ||
} | ||
} | ||
} | ||
} |
Binary file added
BIN
+1.4 KB
Samples/Template10.NuGet.FileActivationSample/Assets/LockScreenLogo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.52 KB
Samples/Template10.NuGet.FileActivationSample/Assets/SplashScreen.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.87 KB
...es/Template10.NuGet.FileActivationSample/Assets/Square150x150Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.61 KB
Samples/Template10.NuGet.FileActivationSample/Assets/Square44x44Logo.scale-200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.23 KB
....FileActivationSample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
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.
Binary file added
BIN
+21.9 KB
Samples/Template10.NuGet.FileActivationSample/Assets/T10 1366x768.png
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.
Binary file added
BIN
+22.9 KB
Samples/Template10.NuGet.FileActivationSample/Assets/T10 768x1366.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.13 KB
Samples/Template10.NuGet.FileActivationSample/Assets/Wide310x150Logo.scale-200.png
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
61
Samples/Template10.NuGet.FileActivationSample/Package.appxmanifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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> |
29 changes: 29 additions & 0 deletions
29
Samples/Template10.NuGet.FileActivationSample/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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)] |
31 changes: 31 additions & 0 deletions
31
Samples/Template10.NuGet.FileActivationSample/Properties/Default.rd.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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/). |
Oops, something went wrong.