Share D2D1 rendering code between UWP/WinUI samples
このコミットが含まれているのは:
1 親
63ce21aa06
コミット
7254f1774c
10ファイル変更
+64
-28
検索条件に一致するファイルはありません
@@ -0,0 +1,16 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:ComputeSharp.SwapChain.WinUI.Views"
|
||||
xmlns:win2d="using:Microsoft.Graphics.Canvas.UI.Xaml">
|
||||
|
||||
<Style TargetType="local:D2D1AnimatedPixelShaderPanel">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="local:D2D1AnimatedPixelShaderPanel">
|
||||
<win2d:CanvasAnimatedControl x:Name="PART_CanvasAnimatedControl" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
+5
-5
@@ -29,7 +29,7 @@ public sealed class CanvasAnimatedControl : Grid, ICanvasAnimatedControl, IDispo
|
||||
/// <summary>
|
||||
/// Indicates whether rendering is paused.
|
||||
/// </summary>
|
||||
private bool isPaused;
|
||||
private bool paused;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether a new frame is currently being drawn.
|
||||
@@ -67,14 +67,14 @@ public sealed class CanvasAnimatedControl : Grid, ICanvasAnimatedControl, IDispo
|
||||
/// <summary>
|
||||
/// Gets or sets whether rendering has paused
|
||||
/// </summary>
|
||||
public bool IsPaused
|
||||
public bool Paused
|
||||
{
|
||||
get => this.isPaused;
|
||||
get => this.paused;
|
||||
set
|
||||
{
|
||||
if (this.isPaused != value)
|
||||
if (this.paused != value)
|
||||
{
|
||||
this.isPaused = value;
|
||||
this.paused = value;
|
||||
|
||||
// Start or stop the timers as needed
|
||||
if (value)
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする