support for .NET framework 3.5
Still have bugs
This commit is contained in:
1 parent
5878039e21
commit
7d6b491f25
704 files changed
+48273
-33
No files matched your search
@@ -0,0 +1,56 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Effects;
|
||||
|
||||
namespace HandyControl.Interactivity
|
||||
{
|
||||
public abstract class TransitionEffect : ShaderEffect
|
||||
{
|
||||
// Fields
|
||||
public static readonly DependencyProperty InputProperty =
|
||||
RegisterPixelShaderSamplerProperty("Input", typeof(TransitionEffect), 0, SamplingMode.NearestNeighbor);
|
||||
|
||||
public static readonly DependencyProperty OldImageProperty =
|
||||
RegisterPixelShaderSamplerProperty("OldImage", typeof(TransitionEffect), 1, SamplingMode.NearestNeighbor);
|
||||
|
||||
public static readonly DependencyProperty ProgressProperty = DependencyProperty.Register("Progress",
|
||||
typeof(double), typeof(TransitionEffect), new PropertyMetadata(0.0, PixelShaderConstantCallback(0)));
|
||||
|
||||
// Methods
|
||||
protected TransitionEffect()
|
||||
{
|
||||
UpdateShaderValue(InputProperty);
|
||||
UpdateShaderValue(OldImageProperty);
|
||||
UpdateShaderValue(ProgressProperty);
|
||||
}
|
||||
|
||||
// Properties
|
||||
public Brush Input
|
||||
{
|
||||
get =>
|
||||
(Brush) GetValue(InputProperty);
|
||||
set => SetValue(InputProperty, value);
|
||||
}
|
||||
|
||||
public Brush OldImage
|
||||
{
|
||||
get =>
|
||||
(Brush) GetValue(OldImageProperty);
|
||||
set => SetValue(OldImageProperty, value);
|
||||
}
|
||||
|
||||
public double Progress
|
||||
{
|
||||
get =>
|
||||
(double) GetValue(ProgressProperty);
|
||||
set => SetValue(ProgressProperty, value);
|
||||
}
|
||||
|
||||
public new TransitionEffect CloneCurrentValue()
|
||||
{
|
||||
return (TransitionEffect) base.CloneCurrentValue();
|
||||
}
|
||||
|
||||
protected abstract TransitionEffect DeepCopy();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user