Skip to content

Commit

Permalink
fix: Move property to main class
Browse files Browse the repository at this point in the history
  • Loading branch information
ajpinedam committed Jun 18, 2021
1 parent fe20f83 commit dd05c8f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 22 deletions.
10 changes: 10 additions & 0 deletions src/Uno.UI/UI/Xaml/Controls/FlipView/FlipView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ public FlipView()
InitializePartial();
}

public bool UseTouchAnimationsForAllNavigation
{
get { return (bool)GetValue(UseTouchAnimationsForAllNavigationProperty); }
set { SetValue(UseTouchAnimationsForAllNavigationProperty, value); }
}

// Using a DependencyProperty as the backing store for UseTouchAnimationsForAllNavigation. This enables animation, styling, binding, etc...
public static DependencyProperty UseTouchAnimationsForAllNavigationProperty { get; } =
DependencyProperty.Register("UseTouchAnimationsForAllNavigation", typeof(bool), typeof(FlipView), new FrameworkPropertyMetadata(true));

partial void InitializePartial();

partial void OnSelectedIndexChangedPartial(int oldValue, int newValue, bool animateChange);
Expand Down
10 changes: 0 additions & 10 deletions src/Uno.UI/UI/Xaml/Controls/FlipView/FlipView.iOSAndroid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ namespace Windows.UI.Xaml.Controls
{
public partial class FlipView : Selector
{
public bool UseTouchAnimationsForAllNavigation
{
get { return (bool)GetValue(UseTouchAnimationsForAllNavigationProperty); }
set { SetValue(UseTouchAnimationsForAllNavigationProperty, value); }
}

// Using a DependencyProperty as the backing store for UseTouchAnimationsForAllNavigation. This enables animation, styling, binding, etc...
public static DependencyProperty UseTouchAnimationsForAllNavigationProperty { get; } =
DependencyProperty.Register("UseTouchAnimationsForAllNavigation", typeof(bool), typeof(FlipView), new FrameworkPropertyMetadata(true));

protected override void OnItemsSourceChanged(DependencyPropertyChangedEventArgs e)
{
base.OnItemsSourceChanged(e);
Expand Down
13 changes: 1 addition & 12 deletions src/Uno.UI/UI/Xaml/Controls/FlipView/FlipView.managed.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if __WASM__ || __SKIA__
#if __WASM__ || __SKIA__
using System;
using System.Collections;
using System.Collections.Generic;
Expand Down Expand Up @@ -249,17 +249,6 @@ private void HookTemplate()
/// VERIFYHR / (hr);
}

public bool UseTouchAnimationsForAllNavigation
{
get { return (bool)this.GetValue(UseTouchAnimationsForAllNavigationProperty); }
set { this.SetValue(UseTouchAnimationsForAllNavigationProperty, value); }
}

// Using a DependencyProperty as the backing store for UseTouchAnimationsForAllNavigation. This enables animation, styling, binding, etc...
public static DependencyProperty UseTouchAnimationsForAllNavigationProperty { get; } =
DependencyProperty.Register("UseTouchAnimationsForAllNavigation", typeof(bool), typeof(FlipView), new FrameworkPropertyMetadata(true));


// Saves the Vertical/HorizontalSnapPointsTypes and clears them. This is necessary for us to
// be able to chain animate FlipViewItems.
void SaveAndClearSnapPointsTypes()
Expand Down

0 comments on commit dd05c8f

Please sign in to comment.