-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Win2D pipeline brushes #3112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
michael-hawker
merged 112 commits into
CommunityToolkit:master
from
Sergio0694:feature/win2d-pipeline-brushes
May 17, 2020
Merged
Win2D pipeline brushes #3112
Changes from all commits
Commits
Show all changes
112 commits
Select commit
Hold shift + click to select a range
8d5c6ef
Added extensions and Win2D helpers
Sergio0694 8d2a3cb
Added PipelineBuilder type
Sergio0694 c56259b
Added acrylic and tiles brushes
Sergio0694 5cf2d76
Added XamlCompositionBrush type
Sergio0694 cc3206b
Added Win2D/Composition effects
Sergio0694 137352e
Added pipeline brush
Sergio0694 59fc3e1
Minor code styling tweaks
Sergio0694 6433681
Switched composition cache to ConditionalWeakTable<TKey, TValue>
Sergio0694 3038e0c
Minor performance improvements
Sergio0694 4fc8a3e
More code switched to ConditionalWeakTable<TKey, TValue>
Sergio0694 f3a4a3d
Fixed missing file header
Sergio0694 bb06aef
Added empty PipelineBrush sample page
Sergio0694 873f0c3
Fixed an incorrect namespace
Sergio0694 960440e
Implemented PipelineBrush sample
Sergio0694 5b3caef
Fixed incorrect extensions namespaces
Sergio0694 cf13f31
Reordered using directives
Sergio0694 f1f6993
Code refactoring, added LuminanceToAlpha pipeline effect
Sergio0694 14da07b
Added C# sample code
Sergio0694 84e6fbd
Reordered a using statement
Sergio0694 371e3e2
Renamed some public APIs
Sergio0694 b844a1e
More API refactoring
Sergio0694 89f8886
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 d6ffabb
Removed unused API
Sergio0694 b913c99
Reordered a using statement
Sergio0694 66d4dce
Added support for repeated effects in a pipeline
Sergio0694 05363d4
Animation delegates changed to TimeSpan params
Sergio0694 90fda1f
Added effects setter APIs
Sergio0694 3a2f44c
Removed unnecessary remarks
Sergio0694 fd050ae
Added generic parameter to effect setters
Sergio0694 85b67e6
Added generic parameter to effect animations
Sergio0694 dc7718f
Added overloads to set/animate a color effect
Sergio0694 d331c1b
Fixed some XML docs
Sergio0694 9955738
Added check for composition capabilities in brushes
Sergio0694 371ea4d
BackdropSaturationBrush switched to pipeline
Sergio0694 f24c484
Removed unnecessary using directives
Sergio0694 3f534e6
Added pipeline invert effect
Sergio0694 cac2fd1
BackdropInvertBrush switched to pipeline
Sergio0694 ac6eede
Reordered using directives
Sergio0694 1856e72
BackdropBlurBrush switched to pipeline
Sergio0694 e63534c
Added sepia effect APIs
Sergio0694 f10c10a
BackdropSepiaBrush switched to pipeline
Sergio0694 e9fac05
Added HDR color pipeline initialization APIs
Sergio0694 184cd2b
Minor code refactoring
Sergio0694 a44b3ad
More code refactoring
Sergio0694 f4d37fc
More code refactoring
Sergio0694 066b948
Added exposure effect
Sergio0694 066666a
Added grayscale effect
Sergio0694 1d6a8f4
Minor code refactoring and bug fixes
Sergio0694 8147dbb
Switched to ValueTask<T> to reduce allocations, new APIs
Sergio0694 83103b7
Removed unnecessary APIs
Sergio0694 b17e27f
Streamlined prebuilt acrylic pipelines
Sergio0694 fcc39d7
Added support for live updates in the acrylic brush
Sergio0694 a1baa2f
Code refactoring to keep the style consistent
Sergio0694 9173a63
Added support for noiseless acrylic effects
Sergio0694 c053590
Code refactoring
Sergio0694 2283071
Added XML remarks with Win2D reference links
Sergio0694 667b932
Renamed the TintEffect type
Sergio0694 abb0b5b
Added TintEffect
Sergio0694 295f4ee
Added TemperatureAndTintEffect
Sergio0694 92a60db
Added HueRotationEffect
Sergio0694 02158fb
Aadded missing capability check
Sergio0694 e86b0f7
Removed unnecessary APIs, code refactoring
Sergio0694 33c1153
Removed an unnecessary resize step
Sergio0694 762cb16
Win2DImageHelper class renamed to SurfaceLoader
Sergio0694 e7d8b36
Unified SurfaceLoader APIs in the .Media package
Sergio0694 36f4bbe
Added sample page for the AcrylicBrush
Sergio0694 5a8d4f4
Updated AcrylicBrush icon
Sergio0694 6254e6f
Added bindings for the AcrylicBrush sample
Sergio0694 d2d13c6
Added dependency property to the TilesBrush
Sergio0694 452ba69
Added sample page for the TilesBrush
Sergio0694 c8fcd9d
Fixed two XML comments
Sergio0694 5af6d0b
Updated tile texture
Sergio0694 e499c25
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 e322de8
Added new brushes to the readme
Sergio0694 c9c71cb
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 2880686
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 6310bfc
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 4e64a24
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 655fd47
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 96e10ee
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 c1b5e39
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 3411bd6
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 60525b9
Merge branch 'master' into feature/win2d-pipeline-brushes
michael-hawker 3299698
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 8550651
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 019a1ed
Minor code refactoring
Sergio0694 f887872
Added support for device lost in SurfaceLoader.Instance
Sergio0694 57176f1
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 cb3314e
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 948c8d1
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 d6d0e03
Updated tile brush texture
Sergio0694 0a95001
Added opacity to tile brush sample
Sergio0694 3a6b2a1
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 900bd87
Updated the PipelineBrush sample page icon
Sergio0694 b0623d0
Fixed PipelineBrush sample page shallow copy
Sergio0694 d4e74d8
Update Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TilesBrush/TilesBr…
Sergio0694 a7b3b13
Removed unnecessary CU badges
Sergio0694 3902294
Update Microsoft.Toolkit.Uwp.UI.Media/Brushes/AcrylicBrush.cs
Sergio0694 dd7af19
Added missing effects to shallow copy
Sergio0694 1687b11
Merge branch 'feature/win2d-pipeline-brushes' of https://github.com/S…
Sergio0694 59c101e
Moved brushes to .Media namespace
Sergio0694 ab21baf
Fixed crash in pipeline sample page
Sergio0694 5a8f83b
Switched BlendEffect.Mode to use proxy enum
Sergio0694 65a2b14
Minor code refactoring
Sergio0694 245e5ac
Added unicorn to PipelineBrush sample
Sergio0694 8eb07e9
Fixed code URLs for brushes
Sergio0694 8e7bd05
Fixed documentation URLs to brushes
Sergio0694 b6d81d9
Merge branch 'master' into feature/win2d-pipeline-brushes
Sergio0694 198f2b8
Merge branch 'master' into feature/win2d-pipeline-brushes
michael-hawker cd4af98
Fix StyleCop Issues with namespaces in Brushes
michael-hawker fdfa755
Fixed uppercase acronym in public property
Sergio0694 ade1e04
Added DpiMode property to TilesBrush
Sergio0694 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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.
This file contains hidden or 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
Binary file added
BIN
+24.7 KB
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/AcrylicBrush/AcrylicBrush.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions
18
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/AcrylicBrush/AcrylicBrushPage.xaml
This file contains hidden or 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,18 @@ | ||
| <Page | ||
| x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.AcrylicBrushPage" | ||
| 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" | ||
| xmlns:brushes="using:Microsoft.Toolkit.Uwp.UI.Media" | ||
| mc:Ignorable="d"> | ||
|
|
||
| <!-- Shallow Copy --> | ||
| <Grid> | ||
| <Rectangle> | ||
| <Rectangle.Fill> | ||
| <brushes:AcrylicBrush /> | ||
| </Rectangle.Fill> | ||
| </Rectangle> | ||
| </Grid> | ||
| </Page> |
22 changes: 22 additions & 0 deletions
22
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/AcrylicBrush/AcrylicBrushPage.xaml.cs
This file contains hidden or 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,22 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| using Windows.UI.Xaml.Controls; | ||
|
|
||
| namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages | ||
| { | ||
| /// <summary> | ||
| /// A page that shows how to use the acrylic brushe. | ||
| /// </summary> | ||
| public sealed partial class AcrylicBrushPage : Page | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="AcrylicBrushPage"/> class. | ||
| /// </summary> | ||
| public AcrylicBrushPage() | ||
| { | ||
| this.InitializeComponent(); | ||
| } | ||
| } | ||
| } |
32 changes: 32 additions & 0 deletions
32
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/AcrylicBrush/AcrylicBrushXaml.bind
This file contains hidden or 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,32 @@ | ||
| <Page | ||
| 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" | ||
| xmlns:brushes="using:Microsoft.Toolkit.Uwp.UI.Media" | ||
| xmlns:effects="using:Microsoft.Toolkit.Uwp.UI.Media.Effects" | ||
| mc:Ignorable="d"> | ||
|
|
||
| <Grid> | ||
| <Image Source="ms-appx:///Assets/Photos/BigFourSummerHeat.jpg"/> | ||
| <Grid> | ||
| <Grid.ColumnDefinitions> | ||
| <ColumnDefinition Width="*" /> | ||
| <ColumnDefinition Width="*" /> | ||
| </Grid.ColumnDefinitions> | ||
| <ProgressRing IsActive="True" Grid.ColumnSpan="2" | ||
| VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Red" Width="200" Height="200"/> | ||
| <Border BorderBrush="Black" BorderThickness="1" | ||
| Grid.Column="2" | ||
| Height="400"> | ||
| <Border.Background> | ||
| <brushes:AcrylicBrush Source="@[Source:Enum:AcrylicBackgroundSource.Backdrop]" | ||
| Tint="@[Tint:Brush:DarkCyan]" | ||
| TintMix="@[TintMix:DoubleSlider:0.2:0.0-1.0]" | ||
| BlurAmount="@[BlurAmount:DoubleSlider:12:0.0-32.0]" | ||
| TextureUri="ms-appx:///Assets/BrushAssets/NoiseTexture.png"/> | ||
| </Border.Background> | ||
| </Border> | ||
| </Grid> | ||
| </Grid> | ||
| </Page> |
Binary file added
BIN
+23 KB
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/PipelineBrush/PipelineBrush.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions
20
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/PipelineBrush/PipelineBrushCode.bind
This file contains hidden or 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,20 @@ | ||
| // Defines a brush like the one shown in the XAML code, but via C# code. | ||
| using Microsoft.Toolkit.Uwp.UI.Media; | ||
| using Microsoft.Toolkit.Uwp.UI.Media.Effects; | ||
| using Windows.UI.Xaml.Media; | ||
|
|
||
| Brush brush = | ||
| PipelineBuilder | ||
| .FromBackdrop() | ||
| .LuminanceToAlpha() | ||
| .Opacity(0.4f) | ||
| .Blend( | ||
| PipelineBuilder.FromBackdrop(), | ||
| BlendEffectMode.Multiply) | ||
| .Blur(16) | ||
| .Shade("#FF222222".ToColor(), 0.4f) | ||
| .Blend( | ||
| PipelineBuilder.FromTiles("/Assets/BrushAssets/NoiseTexture.png"), | ||
| BlendEffectMode.Overlay, | ||
| Placement.Background) | ||
| .AsBrush(); |
84 changes: 84 additions & 0 deletions
84
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/PipelineBrush/PipelineBrushPage.xaml
This file contains hidden or 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,84 @@ | ||
| <Page | ||
| x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.PipelineBrushPage" | ||
| 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" | ||
| xmlns:media="using:Microsoft.Toolkit.Uwp.UI.Media" | ||
| xmlns:effects="using:Microsoft.Toolkit.Uwp.UI.Media.Effects" | ||
| mc:Ignorable="d"> | ||
|
|
||
| <!--Shallow copy--> | ||
| <Grid> | ||
| <Image Source="ms-appx:///Assets/Photos/BigFourSummerHeat.jpg"/> | ||
| <Grid> | ||
| <Grid.ColumnDefinitions> | ||
| <ColumnDefinition Width="*" /> | ||
| <ColumnDefinition Width="*" /> | ||
| </Grid.ColumnDefinitions> | ||
| <ProgressRing IsActive="True" Grid.ColumnSpan="2" | ||
| VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Red" Width="200" Height="200"/> | ||
| <Border> | ||
| <Border.Background> | ||
| <media:PipelineBrush> | ||
| <media:PipelineBrush.Effects> | ||
| <effects:AcrylicEffect/> | ||
| <effects:BlendEffect> | ||
| <effects:BlendEffect.Input> | ||
| <effects:BackdropEffect Source="Backdrop"/> | ||
| </effects:BlendEffect.Input> | ||
| </effects:BlendEffect> | ||
| <effects:BlurEffect/> | ||
| <effects:ExposureEffect/> | ||
| <effects:GrayscaleEffect/> | ||
| <effects:HueRotationEffect/> | ||
| </media:PipelineBrush.Effects> | ||
| </media:PipelineBrush> | ||
| </Border.Background> | ||
| </Border> | ||
| <Border> | ||
| <Border.Background> | ||
| <media:PipelineBrush> | ||
| <media:PipelineBrush.Effects> | ||
| <effects:AcrylicEffect/> | ||
| <effects:HueRotationEffect/> | ||
| <effects:BlendEffect> | ||
| <effects:BlendEffect.Input> | ||
| <effects:ImageEffect Uri="ms-appx:///Assets/BrushAssets/NoiseTexture.png"/> | ||
| </effects:BlendEffect.Input> | ||
| </effects:BlendEffect> | ||
| <effects:InvertEffect/> | ||
| <effects:LuminanceToAlphaEffect/> | ||
| <effects:OpacityEffect/> | ||
| <effects:SaturationEffect/> | ||
| <effects:SepiaEffect/> | ||
| </media:PipelineBrush.Effects> | ||
| </media:PipelineBrush> | ||
| </Border.Background> | ||
| </Border> | ||
| <Border> | ||
| <Border.Background> | ||
| <media:PipelineBrush> | ||
| <media:PipelineBrush.Effects> | ||
| <effects:AcrylicEffect/> | ||
| <effects:SepiaEffect/> | ||
| <effects:ShadeEffect/> | ||
| <effects:BlendEffect> | ||
| <effects:BlendEffect.Input> | ||
| <effects:SolidColorEffect/> | ||
| </effects:BlendEffect.Input> | ||
| </effects:BlendEffect> | ||
| <effects:TemperatureAndTintEffect/> | ||
| <effects:BlendEffect> | ||
| <effects:BlendEffect.Input> | ||
| <effects:TileEffect Uri="ms-appx:///Assets/BrushAssets/NoiseTexture.png"/> | ||
| </effects:BlendEffect.Input> | ||
| </effects:BlendEffect> | ||
| <effects:TintEffect/> | ||
| </media:PipelineBrush.Effects> | ||
| </media:PipelineBrush> | ||
| </Border.Background> | ||
| </Border> | ||
| </Grid> | ||
| </Grid> | ||
| </Page> |
22 changes: 22 additions & 0 deletions
22
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/PipelineBrush/PipelineBrushPage.xaml.cs
This file contains hidden or 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,22 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| using Windows.UI.Xaml.Controls; | ||
|
|
||
| namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages | ||
| { | ||
| /// <summary> | ||
| /// A page that shows how to use the pipeline brushes. | ||
| /// </summary> | ||
| public sealed partial class PipelineBrushPage : Page | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="PipelineBrushPage"/> class. | ||
| /// </summary> | ||
| public PipelineBrushPage() | ||
| { | ||
| this.InitializeComponent(); | ||
| } | ||
| } | ||
| } |
51 changes: 51 additions & 0 deletions
51
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/PipelineBrush/PipelineBrushXaml.bind
This file contains hidden or 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,51 @@ | ||
| <Page | ||
| 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" | ||
| xmlns:brushes="using:Microsoft.Toolkit.Uwp.UI.Media" | ||
| xmlns:effects="using:Microsoft.Toolkit.Uwp.UI.Media.Effects" | ||
| mc:Ignorable="d"> | ||
|
|
||
| <Grid> | ||
| <Image Source="ms-appx:///Assets/Photos/BigFourSummerHeat.jpg"/> | ||
| <Grid> | ||
| <Grid.ColumnDefinitions> | ||
| <ColumnDefinition Width="*" /> | ||
| <ColumnDefinition Width="*" /> | ||
| </Grid.ColumnDefinitions> | ||
| <ProgressRing IsActive="True" Grid.ColumnSpan="2" | ||
| VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Red" Width="200" Height="200"/> | ||
| <Border BorderBrush="Black" BorderThickness="1" | ||
| Grid.Column="2" | ||
| Height="400"> | ||
| <Border.Background> | ||
| <brushes:PipelineBrush> | ||
| <brushes:PipelineBrush.Effects> | ||
| <effects:BackdropEffect Source="Backdrop"/> | ||
| <effects:LuminanceToAlphaEffect/> | ||
| <effects:OpacityEffect Value="0.4"/> | ||
| <effects:BlendEffect Mode="Multiply"> | ||
| <effects:BlendEffect.Input> | ||
| <effects:BackdropEffect Source="Backdrop"/> | ||
michael-hawker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </effects:BlendEffect.Input> | ||
| </effects:BlendEffect> | ||
| <effects:BlurEffect Value="16"/> | ||
| <effects:ShadeEffect Color="#FF222222" Intensity="0.2"/> | ||
| <effects:BlendEffect Mode="Overlay" Placement="Background"> | ||
| <effects:BlendEffect.Input> | ||
| <effects:TileEffect Uri="ms-appx:///Assets/BrushAssets/NoiseTexture.png"/> | ||
| </effects:BlendEffect.Input> | ||
| </effects:BlendEffect> | ||
| <effects:BlendEffect Mode="Overlay" Placement="Background"> | ||
| <effects:BlendEffect.Input> | ||
| <effects:ImageEffect Uri="ms-appx:///SamplePages/DropShadowPanel/Unicorn.png"/> | ||
| </effects:BlendEffect.Input> | ||
| </effects:BlendEffect> | ||
| </brushes:PipelineBrush.Effects> | ||
| </brushes:PipelineBrush> | ||
| </Border.Background> | ||
| </Border> | ||
| </Grid> | ||
| </Grid> | ||
| </Page> | ||
Binary file added
BIN
+25.4 KB
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TilesBrush/TilesBrush.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions
18
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TilesBrush/TilesBrushPage.xaml
This file contains hidden or 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,18 @@ | ||
| <Page | ||
| x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.TilesBrushPage" | ||
| 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" | ||
| xmlns:brushes="using:Microsoft.Toolkit.Uwp.UI.Media" | ||
| mc:Ignorable="d"> | ||
|
|
||
| <!-- Shallow Copy --> | ||
| <Grid> | ||
| <Rectangle> | ||
| <Rectangle.Fill> | ||
| <brushes:TilesBrush /> | ||
| </Rectangle.Fill> | ||
| </Rectangle> | ||
| </Grid> | ||
| </Page> |
22 changes: 22 additions & 0 deletions
22
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TilesBrush/TilesBrushPage.xaml.cs
This file contains hidden or 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,22 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| using Windows.UI.Xaml.Controls; | ||
|
|
||
| namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages | ||
| { | ||
| /// <summary> | ||
| /// A page that shows how to use the tiles brushe. | ||
| /// </summary> | ||
| public sealed partial class TilesBrushPage : Page | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="TilesBrushPage"/> class. | ||
| /// </summary> | ||
| public TilesBrushPage() | ||
| { | ||
| this.InitializeComponent(); | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.