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 AllowDrop="True" DragOver="OnFileDragOver" DragLeave="OnFileDragLeave" Drop="OnFileDrop"> | |
<GridView x:Name="FileList" ItemsSource="{Binding Files}" IsItemClickEnabled="True" SelectionMode="None" /> | |
<RelativePanel x:Name="AddFilePanel" Background="#44000000" Visibility="Collapsed"> | |
<SymbolIcon x:Name="AddSymbol" Symbol="Add" RelativePanel.AlignVerticalCenterWithPanel="True" RelativePanel.AlignHorizontalCenterWithPanel="True" Foreground="White" RenderTransformOrigin="0.5,0.5"> | |
<SymbolIcon.RenderTransform> | |
<CompositeTransform ScaleX="1.5" ScaleY="1.5"/> | |
</SymbolIcon.RenderTransform> | |
</SymbolIcon> |
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 DragDropXAML | |
{ | |
public class DragDropXAMLExample | |
{ | |
public ObservableCollection<AppFile> Files { get; } | |
private void OnFileDragOver(object sender, DragEventArgs e) | |
{ | |
e.AcceptedOperation = DataPackageOperation.Copy; |
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 class UIElementParallaxEffectBehavior : DependencyObject, IBehavior | |
{ | |
public static readonly DependencyProperty ParallaxElementProperty = | |
DependencyProperty.Register( | |
"ParallaxElement", | |
typeof(UIElement), | |
typeof(UIElementParallaxEffectBehavior), | |
new PropertyMetadata(null, OnParallaxElementChanged)); | |
public static readonly DependencyProperty ParallaxMultiplierProperty = |
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 | |
} |
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
<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
<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
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
public MainPage() | |
{ | |
// Initialization of page and inking inputs... | |
this.myCanvas.InkPresenter.ActivateCustomDrying(); | |
this.myCanvas.InkPresenter.SetPredefinedConfiguration(InkPresenterPredefinedConfiguration.SimpleMultiplePointer); // This turns on multi pointer input. | |
} |
OlderNewer