Class SkiaViewSwitcher
Display and hide views, eventually animating them
public class SkiaViewSwitcher : SkiaLayout, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IVisualElementController, IElementController, IView, ITransform, IElement, IVisualTreeElement, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISkiaGestureListener, IHasAfterEffects, ISkiaDisposable, ISkiaGridLayout, ISkiaLayout, ISkiaControl, IDrawnBase, ICanBeUpdatedWithContext, ICanBeUpdated, ILayoutInsideViewport, IInsideViewport, IDisposable, IDefinesViewport, IVisibilityAware
- Inheritance
-
SkiaViewSwitcher
- Implements
- Inherited Members
- Extension Methods
Constructors
SkiaViewSwitcher()
public SkiaViewSwitcher()
Fields
Custom
public static readonly Easing Custom
Field Value
DisplayingIndexProperty
public static readonly BindableProperty DisplayingIndexProperty
Field Value
FirstViewAppeared
protected bool FirstViewAppeared
Field Value
IsAnimatingProperty
public static readonly BindableProperty IsAnimatingProperty
Field Value
IsApplyingIdex
protected bool IsApplyingIdex
Field Value
IsRendered
public bool IsRendered
Field Value
NavigationBusyProperty
public static readonly BindableProperty NavigationBusyProperty
Field Value
NavigationStacks
for navigation inside pseudo tabs
public Dictionary<int, List<SkiaViewSwitcher.NavigationStackEntry>> NavigationStacks
Field Value
PagesAnimationEasingProperty
public static readonly BindableProperty PagesAnimationEasingProperty
Field Value
PagesAnimationSpeedProperty
public static readonly BindableProperty PagesAnimationSpeedProperty
Field Value
PreviousVisibleViewIndex
protected int PreviousVisibleViewIndex
Field Value
SelectedIndexProperty
public static readonly BindableProperty SelectedIndexProperty
Field Value
SemaphoreNavigationStack
protected SemaphoreSlim SemaphoreNavigationStack
Field Value
TabsAnimationEasingProperty
public static readonly BindableProperty TabsAnimationEasingProperty
Field Value
TabsAnimationSpeedProperty
public static readonly BindableProperty TabsAnimationSpeedProperty
Field Value
TimerUpdateLocked
protected RestartingTimer<(int, bool)> TimerUpdateLocked
Field Value
- RestartingTimer<(int, bool)>
Properties
ActiveView
public SkiaViewSwitcher.NavigationStackEntry ActiveView { get; set; }
Property Value
AnimatePages
public bool AnimatePages { get; set; }
Property Value
AnimateTabs
public bool AnimateTabs { get; set; }
Property Value
DisplayingIndex
public int DisplayingIndex { get; set; }
Property Value
IsAnimating
public bool IsAnimating { get; set; }
Property Value
IsPopping
public bool IsPopping { get; protected set; }
Property Value
IsPushing
public bool IsPushing { get; protected set; }
Property Value
NavigationBusy
public bool NavigationBusy { get; set; }
Property Value
PagesAnimationEasing
public Easing PagesAnimationEasing { get; set; }
Property Value
PagesAnimationSpeed
public int PagesAnimationSpeed { get; set; }
Property Value
PreviousVisibleView
public SkiaViewSwitcher.NavigationStackEntry PreviousVisibleView { get; set; }
Property Value
SelectedIndex
public int SelectedIndex { get; set; }
Property Value
TabsAnimationEasing
public Easing TabsAnimationEasing { get; set; }
Property Value
TabsAnimationSpeed
public int TabsAnimationSpeed { get; set; }
Property Value
TopView
public SkiaControl TopView { get; protected set; }
Property Value
TrackIndexPosition
public RelativePositionType TrackIndexPosition { get; }
Property Value
Viewport
public ScaledRect Viewport { get; }
Property Value
Methods
ApplyBindingContext()
public override void ApplyBindingContext()
ApplySelectedIndex(OrderedIndex)
protected virtual Task ApplySelectedIndex(OrderedIndex index)
Parameters
indexOrderedIndex
Returns
BringPageToFront(Type, int)
public bool BringPageToFront(Type type, int tab = -1)
Parameters
Returns
ChangeViewVisibility(SkiaControl, bool)
protected void ChangeViewVisibility(SkiaControl view, bool state)
Parameters
viewSkiaControlstatebool
DebugAction()
public void DebugAction()
Draw(DrawingContext)
protected override void Draw(DrawingContext context)
Parameters
contextDrawingContext
ExecuteTransitionAnimation(DoubleViewTransitionType, SkiaControl?, SkiaControl)
protected virtual Task ExecuteTransitionAnimation(DoubleViewTransitionType doubleViewTransitionType, SkiaControl? previousVisibleView, SkiaControl newVisibleView)
Parameters
doubleViewTransitionTypeDoubleViewTransitionTypepreviousVisibleViewSkiaControlnewVisibleViewSkiaControl
Returns
FindPageInStack<T>(int)
public T FindPageInStack<T>(int tab = -1) where T : SkiaControl
Parameters
tabint
Returns
- T
Type Parameters
T
GetCurrentPage(int)
public SkiaControl GetCurrentPage(int tab = -1)
Parameters
tabint
Returns
GetCurrentTabNavigationIndex()
public int GetCurrentTabNavigationIndex()
Returns
GetNavigationStack(int)
public List<SkiaViewSwitcher.NavigationStackEntry> GetNavigationStack(int index)
Parameters
indexint
Returns
GetRootView(int)
public SkiaViewSwitcher.NavigationStackEntry GetRootView(int selectedIndex)
Parameters
selectedIndexint
Returns
GetTopView(int)
Get tab view or tab top subview if has navigation stack
public SkiaViewSwitcher.NavigationStackEntry GetTopView(int selectedIndex)
Parameters
selectedIndexint
Returns
LauchTimerOnLock(int, (int index, bool animate))
protected void LauchTimerOnLock(int seconds, (int index, bool animate) args)
Parameters
OnAppeared()
This event can sometimes be called without prior OnAppearing
public override void OnAppeared()
OnAppearing()
This can sometimes be omitted,
public override void OnAppearing()
OnChildAdded(SkiaControl)
public override void OnChildAdded(SkiaControl view)
Parameters
viewSkiaControl
OnDisappearing()
public override void OnDisappearing()
OnDisposing()
Base performs some cleanup actions with Superview
public override void OnDisposing()
OnLayoutChanged()
DrawingRect size changed
protected override void OnLayoutChanged()
OnSelectedIndexApplied()
protected virtual void OnSelectedIndexApplied()
PopAllTabsToRoot()
public void PopAllTabsToRoot()
PopModal(bool)
public void PopModal(bool animated)
Parameters
animatedbool
PopPage(int)
public Task PopPage(int tab = -1)
Parameters
tabint
Returns
PopTabToRoot()
Must be launched on main thread only !!!
public Task PopTabToRoot()
Returns
ProcessIndexBufferAsync()
public Task ProcessIndexBufferAsync()
Returns
PushIndex(OrderedIndex)
public void PushIndex(OrderedIndex index)
Parameters
indexOrderedIndex
PushView(SkiaControl, bool, bool, int)
public void PushView(SkiaControl view, bool animated, bool preserve = false, int tab = -1)
Parameters
viewSkiaControlanimatedboolpreservebooltabint
RemovePageFromStack<T>(int)
public void RemovePageFromStack<T>(int tab = -1) where T : SkiaControl
Parameters
tabint
Type Parameters
T
Reset()
public void Reset()
RevealNavigationView(NavigationStackEntry)
Set IsVisible, reset transforms and opacity and send OnAppeared event
protected virtual void RevealNavigationView(SkiaViewSwitcher.NavigationStackEntry newVisibleView)
Parameters
newVisibleViewSkiaViewSwitcher.NavigationStackEntry
ScrollTo(float, float, float, bool)
public void ScrollTo(float x, float y, float maxTimeSecs, bool clamp)
Parameters
SendOnAppeared(SkiaControl)
public void SendOnAppeared(SkiaControl view)
Parameters
viewSkiaControl
SendOnAppearing(SkiaControl)
public void SendOnAppearing(SkiaControl view)
Parameters
viewSkiaControl
SendOnDisappeared(SkiaControl)
public void SendOnDisappeared(SkiaControl view)
Parameters
viewSkiaControl
SendOnDisappearing(SkiaControl)
public void SendOnDisappearing(SkiaControl view)
Parameters
viewSkiaControl
SendOnLoaded(SkiaControl)
public void SendOnLoaded(SkiaControl view)
Parameters
viewSkiaControl
SetChildren(IEnumerable<SkiaControl>)
public override void SetChildren(IEnumerable<SkiaControl> views)
Parameters
viewsIEnumerable<SkiaControl>
SetupTransitionAnimation(DoubleViewTransitionType, SkiaControl, SkiaControl)
protected virtual Task SetupTransitionAnimation(DoubleViewTransitionType doubleViewTransitionType, SkiaControl previousVisibleView, SkiaControl newVisibleView)
Parameters
doubleViewTransitionTypeDoubleViewTransitionTypepreviousVisibleViewSkiaControlnewVisibleViewSkiaControl
Returns
UnloadView(NavigationStackEntry)
protected void UnloadView(SkiaViewSwitcher.NavigationStackEntry view)
Parameters
UpdateVisibleIndex()
public void UpdateVisibleIndex()
Events
BusyChanged
public event EventHandler<bool> BusyChanged
Event Type
LoadedLazyView
public event EventHandler<SkiaControl> LoadedLazyView