diff --git a/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs b/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs index c696a244..d3679040 100644 --- a/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs +++ b/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs @@ -261,7 +261,7 @@ namespace HandyControl.Controls public bool IsError { - get => (bool) GetValue(IsErrorProperty); + get => (bool)GetValue(IsErrorProperty); set => SetValue(IsErrorProperty, value); } @@ -270,7 +270,7 @@ namespace HandyControl.Controls public string ErrorStr { - get => (string) GetValue(ErrorStrProperty); + get => (string)GetValue(ErrorStrProperty); set => SetValue(ErrorStrProperty, value); } @@ -279,7 +279,7 @@ namespace HandyControl.Controls public TextType TextType { - get => (TextType) GetValue(TextTypeProperty); + get => (TextType)GetValue(TextTypeProperty); set => SetValue(TextTypeProperty, value); } @@ -288,7 +288,7 @@ namespace HandyControl.Controls public bool ShowClearButton { - get => (bool) GetValue(ShowClearButtonProperty); + get => (bool)GetValue(ShowClearButtonProperty); set => SetValue(ShowClearButtonProperty, value); } @@ -297,7 +297,7 @@ namespace HandyControl.Controls private static void OnClockChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { - var ctl = (TimePicker) d; + var ctl = (TimePicker)d; var oldClock = e.OldValue as ClockBase; var newClock = e.NewValue as ClockBase; @@ -317,7 +317,7 @@ namespace HandyControl.Controls public ClockBase Clock { - get => (ClockBase) GetValue(ClockProperty); + get => (ClockBase)GetValue(ClockProperty); set => SetValue(ClockProperty, value); } @@ -644,7 +644,7 @@ namespace HandyControl.Controls if (SelectedTime != null) { - var newtext = DateTimeToString((DateTime) SelectedTime); + var newtext = DateTimeToString((DateTime)SelectedTime); SafeSetText(newtext); return SelectedTime; } diff --git a/src/Shared/HandyControl_Shared/Controls/TabControl/TabControl.cs b/src/Shared/HandyControl_Shared/Controls/TabControl/TabControl.cs index f94b6a71..1c92fd43 100644 --- a/src/Shared/HandyControl_Shared/Controls/TabControl/TabControl.cs +++ b/src/Shared/HandyControl_Shared/Controls/TabControl/TabControl.cs @@ -210,7 +210,7 @@ namespace HandyControl.Controls } if (IsEnableAnimation) { - _headerPanel.ClearValue(TabPanel.FluidMoveDurationProperty); + _headerPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, new Duration(TimeSpan.FromMilliseconds(200))); } else { @@ -311,7 +311,7 @@ namespace HandyControl.Controls Items.Insert(0, item); if (IsEnableAnimation) { - _headerPanel.ClearValue(TabPanel.FluidMoveDurationProperty); + _headerPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, new Duration(TimeSpan.FromMilliseconds(200))); } else { diff --git a/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs b/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs index 4749e62d..c01843d3 100644 --- a/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs +++ b/src/Shared/HandyControl_Shared/Controls/TabControl/TabItem.cs @@ -154,7 +154,7 @@ namespace HandyControl.Controls if (TabControlParent.IsEnableAnimation) { - TabPanel.ClearValue(TabPanel.FluidMoveDurationProperty); + TabPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, new Duration(TimeSpan.FromMilliseconds(200))); } else {