Skip to content

Commit

Permalink
chore: Update TabViewListView to winui3/release/1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Oct 22, 2024
1 parent 0f914e3 commit 0374eba
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Uno.UI/Microsoft/UI/Xaml/Controls/TabView/TabView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ protected override Size MeasureOverride(Size availableSize)
return base.MeasureOverride(availableSize);
}

private void UpdateTabWidths(bool shouldUpdateWidths = true, bool fillAllAvailableSpace = true)
internal void UpdateTabWidths(bool shouldUpdateWidths = true, bool fillAllAvailableSpace = true)
{
double tabWidth = double.NaN;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
// MUX Reference: TabViewAutomationPeer.cpp, commit 542e6f9

using System;
using Microsoft/* UWP don't rename */.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Automation.Peers;
using Microsoft.UI.Xaml.Automation.Provider;
using Microsoft/* UWP don't rename */.UI.Xaml.Controls;

namespace Microsoft.UI.Xaml.Automation.Peers;
namespace Microsoft/* UWP don't rename */.UI.Xaml.Automation.Peers;

/// <summary>
/// Exposes TabView types to Microsoft UI Automation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// <auto-generated>
#pragma warning disable 108 // new keyword hiding
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Xaml.Controls
namespace Microsoft/* UWP don't rename */.UI.Xaml.Controls
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// <auto-generated>
#pragma warning disable 108 // new keyword hiding
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Xaml.Controls
namespace Microsoft/* UWP don't rename */.UI.Xaml.Controls
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
// Licensed under the MIT License. See LICENSE in the project root for license information.
// MUX Reference: TabViewItemAutomationPeer.cpp, commit 9349a0fbc

using Microsoft.UI.Xaml.Automation.Provider;
using Microsoft/* UWP don't rename */.UI.Xaml.Controls;
using Uno.UI.Helpers.WinUI;
using Microsoft.UI.Xaml.Automation.Peers;
using Microsoft.UI.Xaml.Automation.Provider;

namespace Microsoft/* UWP don't rename */.UI.Xaml.Automation.Peers;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
// MUX Reference: TabViewListView.cpp, commit 4bab3245a
// MUX Reference src\controls\dev\TabView\TabViewListView.cpp, commit d74a0332

using Uno.UI.Helpers.WinUI;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media;
using Uno.UI.Helpers.WinUI;

namespace Microsoft/* UWP don't rename */.UI.Xaml.Controls.Primitives;

Expand Down Expand Up @@ -74,16 +72,24 @@ protected override void PrepareContainerForItemOverride(DependencyObject element
// as they are already set correctly here.
//
// We know we are currently looking at a TabViewItem being recycled if its parent TabView has already been set.
if (tvi.GetParentTabView() == null)
var parentTabView = tvi.GetParentTabView();
if (parentTabView is null)
{
var tabView = SharedHelpers.GetAncestorOfType<TabView>(VisualTreeHelper.GetParent(this));
if (tabView != null)
{
tvi.OnTabViewWidthModeChanged(tabView.TabWidthMode);
tvi.SetParentTabView(tabView);

parentTabView = tabView;
}
}

if (parentTabView is not null)
{
parentTabView.UpdateTabWidths();
}

base.PrepareContainerForItemOverride(element, item);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// <auto-generated>
#pragma warning disable 108 // new keyword hiding
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Xaml.Controls
namespace Microsoft/* UWP don't rename */.UI.Xaml.Controls
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// <auto-generated>
#pragma warning disable 108 // new keyword hiding
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Xaml.Controls
namespace Microsoft/* UWP don't rename */.UI.Xaml.Controls
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
[global::Uno.NotImplemented]
Expand Down

0 comments on commit 0374eba

Please sign in to comment.