Skip to content

Commit

Permalink
MultiViewZero is born. Works as a POC.
Browse files Browse the repository at this point in the history
  • Loading branch information
Keflon committed Feb 18, 2024
1 parent 703cded commit 3f742c8
Show file tree
Hide file tree
Showing 13 changed files with 604 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private static void EaseInChanged(BindableObject bindable, object oldValue, obje
public Easing EaseIn
{
get => (Easing)GetValue(EaseInProperty);
set => SetValue(HeaderProperty, value);
set => SetValue(EaseInProperty, value);
}

public static readonly BindableProperty EaseOutProperty = BindableProperty.Create(nameof(EaseOut), typeof(Easing), typeof(ExpanderZero), Easing.Linear, BindingMode.OneWay, null, EaseOutChanged);
Expand All @@ -124,7 +124,7 @@ private static void EaseOutChanged(BindableObject bindable, object oldValue, obj
public Easing EaseOut
{
get => (Easing)GetValue(EaseOutProperty);
set => SetValue(HeaderProperty, value);
set => SetValue(EaseInProperty, value);
}

public static readonly BindableProperty DurationMillisecondsProperty = BindableProperty.Create(nameof(DurationMilliseconds), typeof(uint), typeof(ExpanderZero), (uint)500, BindingMode.OneWay, null, DurationMillisecondsChanged);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public partial class MaskZero : ContentView
private bool _updateRequested = false;
private View _actualTarget;
private double _alphaMultiplier;
private bool _loaded;

public MaskZero()
{
Expand All @@ -29,9 +30,9 @@ public MaskZero()

DescendantAdded += MaskZero_DescendantAdded;
DescendantRemoved += MaskZero_DescendantRemoved;
}


}

protected override void OnSizeAllocated(double width, double height)
{
Expand Down
118 changes: 118 additions & 0 deletions FunctionZero.Maui.Controls/Controls/MultiView/MultiViewAnimation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FunctionZero.Maui.Controls
{
public class MultiViewAnimation : BindableObject
{
#region FromProperty

public static readonly BindableProperty FromProperty = BindableProperty.Create(nameof(From), typeof(double), typeof(MultiViewAnimation), 0.0, BindingMode.OneWay, null, FromChanged);

public double From
{
get { return (double)GetValue(FromProperty); }
set { SetValue(FromProperty, value); }
}

private static void FromChanged(BindableObject bindable, object oldValue, object newValue)
{
var self = (MultiViewAnimation)bindable;

}

#endregion

#region ToViewNameProperty

public static readonly BindableProperty ToProperty = BindableProperty.Create(nameof(To), typeof(double), typeof(MultiViewAnimation), 0.0, BindingMode.OneWay, null, ToChanged);

public double To
{
get { return (double)GetValue(ToProperty); }
set { SetValue(ToProperty, value); }
}

private static void ToChanged(BindableObject bindable, object oldValue, object newValue)
{
var self = (MultiViewAnimation)bindable;

}

#endregion

//#region DurationProperty

//public static readonly BindableProperty DurationProperty = BindableProperty.Create(nameof(Duration), typeof(double), typeof(MultiViewAnimation), 0.0, BindingMode.OneWay, null, DurationChanged);

//public double Duration
//{
// get { return (double)GetValue(DurationProperty); }
// set { SetValue(DurationProperty, value); }
//}

//private static void DurationChanged(BindableObject bindable, object oldValue, object newValue)
//{
// var self = (MultiViewAnimation)bindable;

//}

//#endregion

#region EasingFuncProperty

public static readonly BindableProperty EasingFuncProperty = BindableProperty.Create(nameof(EasingFunc), typeof(Easing), typeof(MultiViewAnimation), Easing.Linear, BindingMode.OneWay, null, EasingFuncChanged);

public Easing EasingFunc
{
get { return (Easing)GetValue(EasingFuncProperty); }
set { SetValue(EasingFuncProperty, value); }
}

private static void EasingFuncChanged(BindableObject bindable, object oldValue, object newValue)
{
var self = (MultiViewAnimation)bindable;

}

#endregion

#region ExpressionProperty

public static readonly BindableProperty ExpressionProperty = BindableProperty.Create(nameof(Expression), typeof(string), typeof(MultiViewAnimation), string.Empty, BindingMode.OneWay, null, ExpressionChanged);

public string Expression
{
get { return (string)GetValue(ExpressionProperty); }
set { SetValue(ExpressionProperty, value); }
}

private static void ExpressionChanged(BindableObject bindable, object oldValue, object newValue)
{
var self = (MultiViewAnimation)bindable;
}

#endregion

#region FinishedExpressionProperty

public static readonly BindableProperty FinishedExpressionProperty = BindableProperty.Create(nameof(FinishedExpression), typeof(string), typeof(MultiViewAnimation), string.Empty, BindingMode.OneWay, null, FinishedExpressionChanged);

public string FinishedExpression
{
get { return (string)GetValue(FinishedExpressionProperty); }
set { SetValue(FinishedExpressionProperty, value); }
}

private static void FinishedExpressionChanged(BindableObject bindable, object oldValue, object newValue)
{
var self = (MultiViewAnimation)bindable;
}

#endregion

}
}
Loading

0 comments on commit 3f742c8

Please sign in to comment.