Code style tweaks in 'D2D1AnimatedPixelShaderPanel'
このコミットが含まれているのは:
1 親
b76ffa67d7
コミット
8a851c401c
1ファイル変更
+36
-36
@@ -12,6 +12,24 @@ namespace ComputeSharp.SwapChain.WinUI.Views;
|
||||
[TemplatePart(Name = "PART_CanvasAnimatedControl", Type = typeof(CanvasAnimatedControl))]
|
||||
public sealed class D2D1AnimatedPixelShaderPanel : Control
|
||||
{
|
||||
/// <summary>
|
||||
/// The <see cref="DependencyProperty"/> backing <see cref="PixelShaderEffect"/>.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty PixelShaderEffectProperty = DependencyProperty.Register(
|
||||
nameof(PixelShaderEffect),
|
||||
typeof(PixelShaderEffect),
|
||||
typeof(D2D1AnimatedPixelShaderPanel),
|
||||
new PropertyMetadata(null, OnPixelShaderEffectPropertyChanged));
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="DependencyProperty"/> backing <see cref="IsPaused"/>.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty IsPausedProperty = DependencyProperty.Register(
|
||||
nameof(IsPaused),
|
||||
typeof(bool),
|
||||
typeof(D2D1AnimatedPixelShaderPanel),
|
||||
new PropertyMetadata(false, OnIsPausedPropertyChanged));
|
||||
|
||||
/// <summary>
|
||||
/// The wrapped <see cref="CanvasAnimatedControl"/> instance used to render frames.
|
||||
/// </summary>
|
||||
@@ -33,6 +51,24 @@ public sealed class D2D1AnimatedPixelShaderPanel : Control
|
||||
Unloaded += D2D1AnimatedPixelShaderPanel_Unloaded;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="Core.Shaders.PixelShaderEffect"/> instance to use to render content.
|
||||
/// </summary>
|
||||
public PixelShaderEffect? PixelShaderEffect
|
||||
{
|
||||
get => (PixelShaderEffect?)GetValue(PixelShaderEffectProperty);
|
||||
set => SetValue(PixelShaderEffectProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether or not the rendering is paused.
|
||||
/// </summary>
|
||||
public bool IsPaused
|
||||
{
|
||||
get => (bool)GetValue(IsPausedProperty);
|
||||
set => SetValue(IsPausedProperty, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void OnApplyTemplate()
|
||||
{
|
||||
@@ -78,24 +114,6 @@ public sealed class D2D1AnimatedPixelShaderPanel : Control
|
||||
args.DrawingSession.DrawImage(this.pixelShaderEffect);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="Core.Shaders.PixelShaderEffect"/> instance to use to render content.
|
||||
/// </summary>
|
||||
public PixelShaderEffect? PixelShaderEffect
|
||||
{
|
||||
get => (PixelShaderEffect?)GetValue(PixelShaderEffectProperty);
|
||||
set => SetValue(PixelShaderEffectProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="DependencyProperty"/> backing <see cref="PixelShaderEffect"/>.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty PixelShaderEffectProperty = DependencyProperty.Register(
|
||||
nameof(PixelShaderEffect),
|
||||
typeof(PixelShaderEffect),
|
||||
typeof(D2D1AnimatedPixelShaderPanel),
|
||||
new PropertyMetadata(null, OnPixelShaderEffectPropertyChanged));
|
||||
|
||||
/// <inheritdoc cref="DependencyPropertyChangedCallback"/>
|
||||
private static void OnPixelShaderEffectPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
@@ -114,24 +132,6 @@ public sealed class D2D1AnimatedPixelShaderPanel : Control
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether or not the rendering is paused.
|
||||
/// </summary>
|
||||
public bool IsPaused
|
||||
{
|
||||
get => (bool)GetValue(IsPausedProperty);
|
||||
set => SetValue(IsPausedProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="DependencyProperty"/> backing <see cref="IsPaused"/>.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty IsPausedProperty = DependencyProperty.Register(
|
||||
nameof(IsPaused),
|
||||
typeof(bool),
|
||||
typeof(D2D1AnimatedPixelShaderPanel),
|
||||
new PropertyMetadata(false, OnIsPausedPropertyChanged));
|
||||
|
||||
/// <inheritdoc cref="DependencyPropertyChangedCallback"/>
|
||||
private static void OnIsPausedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする