diff --git a/samples/ComputeSharp.SwapChain.WinUI/Controls/D2D1AnimatedPixelShaderPanel.cs b/samples/ComputeSharp.SwapChain.WinUI/Controls/D2D1AnimatedPixelShaderPanel.cs
index c1af13358..bf90dc090 100644
--- a/samples/ComputeSharp.SwapChain.WinUI/Controls/D2D1AnimatedPixelShaderPanel.cs
+++ b/samples/ComputeSharp.SwapChain.WinUI/Controls/D2D1AnimatedPixelShaderPanel.cs
@@ -12,6 +12,24 @@ namespace ComputeSharp.SwapChain.WinUI.Views;
[TemplatePart(Name = "PART_CanvasAnimatedControl", Type = typeof(CanvasAnimatedControl))]
public sealed class D2D1AnimatedPixelShaderPanel : Control
{
+ ///
+ /// The backing .
+ ///
+ public static readonly DependencyProperty PixelShaderEffectProperty = DependencyProperty.Register(
+ nameof(PixelShaderEffect),
+ typeof(PixelShaderEffect),
+ typeof(D2D1AnimatedPixelShaderPanel),
+ new PropertyMetadata(null, OnPixelShaderEffectPropertyChanged));
+
+ ///
+ /// The backing .
+ ///
+ public static readonly DependencyProperty IsPausedProperty = DependencyProperty.Register(
+ nameof(IsPaused),
+ typeof(bool),
+ typeof(D2D1AnimatedPixelShaderPanel),
+ new PropertyMetadata(false, OnIsPausedPropertyChanged));
+
///
/// The wrapped instance used to render frames.
///
@@ -33,6 +51,24 @@ public D2D1AnimatedPixelShaderPanel()
Unloaded += D2D1AnimatedPixelShaderPanel_Unloaded;
}
+ ///
+ /// Gets or sets the instance to use to render content.
+ ///
+ public PixelShaderEffect? PixelShaderEffect
+ {
+ get => (PixelShaderEffect?)GetValue(PixelShaderEffectProperty);
+ set => SetValue(PixelShaderEffectProperty, value);
+ }
+
+ ///
+ /// Gets or sets whether or not the rendering is paused.
+ ///
+ public bool IsPaused
+ {
+ get => (bool)GetValue(IsPausedProperty);
+ set => SetValue(IsPausedProperty, value);
+ }
+
///
protected override void OnApplyTemplate()
{
@@ -78,24 +114,6 @@ private void CanvasAnimatedControl_Draw(ICanvasAnimatedControl sender, CanvasAni
args.DrawingSession.DrawImage(this.pixelShaderEffect);
}
- ///
- /// Gets or sets the instance to use to render content.
- ///
- public PixelShaderEffect? PixelShaderEffect
- {
- get => (PixelShaderEffect?)GetValue(PixelShaderEffectProperty);
- set => SetValue(PixelShaderEffectProperty, value);
- }
-
- ///
- /// The backing .
- ///
- public static readonly DependencyProperty PixelShaderEffectProperty = DependencyProperty.Register(
- nameof(PixelShaderEffect),
- typeof(PixelShaderEffect),
- typeof(D2D1AnimatedPixelShaderPanel),
- new PropertyMetadata(null, OnPixelShaderEffectPropertyChanged));
-
///
private static void OnPixelShaderEffectPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -114,24 +132,6 @@ private static void OnPixelShaderEffectPropertyChanged(DependencyObject d, Depen
}
}
- ///
- /// Gets or sets whether or not the rendering is paused.
- ///
- public bool IsPaused
- {
- get => (bool)GetValue(IsPausedProperty);
- set => SetValue(IsPausedProperty, value);
- }
-
- ///
- /// The backing .
- ///
- public static readonly DependencyProperty IsPausedProperty = DependencyProperty.Register(
- nameof(IsPaused),
- typeof(bool),
- typeof(D2D1AnimatedPixelShaderPanel),
- new PropertyMetadata(false, OnIsPausedPropertyChanged));
-
///
private static void OnIsPausedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{