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
protected override void OnNavigatedTo(NavigationEventArgs e) | |
{ | |
base.OnNavigatedTo(e); | |
var getDataProcess = new GetJsonNetworkProcess( | |
client: new HttpClient(), | |
queueId: "GetData", | |
retryOnFail: true, | |
retryLimit: 3, | |
headers: new Dictionary<string, string> { { "YourHeader", "YourHeaderValue" } }) |
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
var getDataProcess = new GetJsonNetworkProcess(client: new HttpClient(), queueId: "GetData") | |
{ | |
Url = "http://www.myapi.com/api/getdata?q=test" | |
}; |
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
public MainPage() | |
{ | |
// Initialization of page and inking inputs... | |
this.myCanvas.InkPresenter.ActivateCustomDrying(); | |
this.myCanvas.InkPresenter.SetPredefinedConfiguration(InkPresenterPredefinedConfiguration.SimpleMultiplePointer); // This turns on multi pointer input. | |
} |
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
public MainPage() | |
{ | |
this.InitializeComponent(); | |
this.myCanvas.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Pen; // Enables only pen. | |
this.myCanvas.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Pen | Windows.UI.Core.CoreInputDeviceTypes.Touch; // Enables pen and touch. | |
} |
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
<Grid> | |
<Grid.Resources> | |
<validation:ValidationRules x:Key="UrlSample"> | |
<validation:ValidationRules.Rules> | |
<rules:UrlValidationRule /> | |
</validation:ValidationRules.Rules> | |
</validation:ValidationRules> | |
</Grid.Resources> | |
<controls:ValidatingTextBox IsMandatory="True" Header="Website" Text="http://www.jamescroft.co.uk" MaxLength="50" ValidationRules="{StaticResource UrlSample}" /> |
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
protected override async void OnLaunched(LaunchActivatedEventArgs e) | |
{ | |
... | |
// Starts the WinUX app exception handler with auto-logging. | |
// Calling a method from WinUX.Diagnostics.Tracing.Logger.Current will also log out. | |
await WinUX.Diagnostics.AppDiagnostics.Current.StartListeningAsync(); | |
... |
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
<UserControl | |
x:Name="ControlRoot" | |
x:Class="WinUX.Xaml.Controls.Inking.DrawingCanvas" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
d:DesignWidth="500" | |
d:DesignHeight="200"> |
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
namespace WinUX.Extensions | |
{ | |
using System; | |
using System.Threading.Tasks; | |
using Windows.Foundation; | |
using Windows.Graphics.DirectX; | |
using Windows.Graphics.Display; | |
using Windows.Graphics.Imaging; | |
using Windows.Storage; |
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
Windows.UI.Core.SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible; | |
Windows.UI.Core.SystemNavigationManager.GetForCurrentView().BackRequested += this.OnBackRequested; | |
... | |
private void OnBackRequested(object sender, BackRequestedEventArgs e) | |
{ | |
// Handle frame navigation | |
} |