Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoy312 committed Aug 1, 2024
1 parent cf84e26 commit 7fb3761
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Uno.UI.Maps/MapPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private void UpdateOwnerSubscriptions()
{
_ownerSubscription.Disposable = null;

_owner = TemplatedParent as MapControl;
_owner = GetTemplatedParent() as MapControl;

if (_owner != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ public partial class Uno12624_LeftRightControl : Control
typeof(Uno12624_LeftRightControl),
new PropertyMetadata(default(object)));

#if !__ANDROID__
public object Left
#else
public new object Left
#endif
{
get => (object)GetValue(LeftProperty);
set => SetValue(LeftProperty, value);
Expand All @@ -36,7 +40,11 @@ public object Left
typeof(Uno12624_LeftRightControl),
new PropertyMetadata(default(object)));

#if !__ANDROID__
public object Right
#else
public new object Right
#endif
{
get => (object)GetValue(RightProperty);
set => SetValue(RightProperty, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public Uno17313()
}
}

public class Uno17313_HeaderedCC : ContentControl
public partial class Uno17313_HeaderedCC : ContentControl
{
#region DependencyProperty: Header

Expand Down Expand Up @@ -45,6 +45,6 @@ public DataTemplate HeaderTemplate
#endregion
}

public class Uno17313_Expander : Uno17313_HeaderedCC { }
public class Uno17313_SettingsExpander : Uno17313_HeaderedCC { }
public class Uno17313_SettingsCard : Uno17313_HeaderedCC { }
public partial class Uno17313_Expander : Uno17313_HeaderedCC { }
public partial class Uno17313_SettingsExpander : Uno17313_HeaderedCC { }
public partial class Uno17313_SettingsCard : Uno17313_HeaderedCC { }
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public Uno9059_VM(Action action)

public Uno9059_RelayCommand CustomCommand { get; set; }
}
public class Uno9059_CustomControl : Control
public partial class Uno9059_CustomControl : Control
{
#region DependencyProperty: Action1

Expand Down
1 change: 0 additions & 1 deletion src/Uno.UI/UI/Xaml/Controls/Pivot/PivotAdapter.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ private void UpdateAdapter()
var fragment = new PivotItemFragment(pivotItem)
{
DataContext = _pivot.DataContext,
TemplatedParent = (IFrameworkElement)_pivot.GetTemplatedParent()
};
return fragment;
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ private void Update()
if (UserVisibleHint && _created && _item != null)
{
_item.DataContext = _dataContext;
_item.SetTemplatedParent(_templatedParent);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ private void OnPointerWheelChanged(object _, PointerRoutedEventArgs args)

private void RestoreScroll()
{
if (TemplatedParent is ScrollViewer sv)
if (GetTemplatedParent() is ScrollViewer sv)
{
if (sv.HorizontalOffset > 0 || sv.VerticalOffset > 0)
{
Expand Down Expand Up @@ -308,7 +308,7 @@ internal bool Set(
// If those values are invalid, the browser will raise the final event anyway.
// Note: If the caller has allowed animation, we assume that it's not interested by a sync response,
// we prefer to wait for the browser to effectively scroll.
(TemplatedParent as ScrollViewer)?.OnPresenterScrolled(
(GetTemplatedParent() as ScrollViewer)?.OnPresenterScrolled(
horizontalOffset ?? nativeHorizontalOffset,
verticalOffset ?? nativeVerticalOffset,
isIntermediate: false
Expand Down

0 comments on commit 7fb3761

Please sign in to comment.