Skip to content

Commit

Permalink
chore: build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoy312 committed Aug 1, 2024
1 parent a3a4dc2 commit 445f25b
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 12 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
2 changes: 1 addition & 1 deletion src/Uno.UI.Toolkit/Diagnostics/DiagnosticsOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ protected override void OnApplyTemplate()
static void OnToolBarSizeChanged(object sender, SizeChangedEventArgs args)
{
// Patches pointer event dispatch on a 0x0 Canvas
if (sender is UIElement { TemplatedParent: DiagnosticsOverlay { TemplatedRoot: Canvas canvas } })
if (sender is UIElement uie && uie.GetTemplatedParent() is DiagnosticsOverlay { TemplatedRoot: Canvas canvas })
{
canvas.Width = args.NewSize.Width;
}
Expand Down
2 changes: 0 additions & 2 deletions src/Uno.UI/UI/Xaml/Controls/Pivot/PivotAdapter.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public void OnDataContextChanged()
foreach (var fragment in _fragments)
{
fragment.DataContext = _pivot.DataContext;
fragment.TemplatedParent = (IFrameworkElement)_pivot.GetTemplatedParent();
}
}

Expand Down Expand Up @@ -84,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 445f25b

Please sign in to comment.