@@ -882,7 +882,11 @@ void OnTabContentPresenterLosingFocus(object sender, LosingFocusEventArgs args)
882
882
883
883
// It is not ideal to call UpdateLayout here, but it is necessary to ensure that the ContentPresenter has expanded its content
884
884
// into the live visual tree.
885
- tabContentPresenter . UpdateLayout ( ) ;
885
+ #if IS_UNO
886
+ // TODO: Uno specific - issue #4925 - Calling UpdateLayout here causes another Measure of TabListView, which is already in progress
887
+ // if this tab was added by data binding. As a result, two copies of each tab would be constructed.
888
+ //tabContentPresenter.UpdateLayout();
889
+ #endif
886
890
887
891
if ( shouldMoveFocusToNewTab )
888
892
{
@@ -1134,20 +1138,21 @@ void UpdateSelectedItem()
1134
1138
var listView = m_listView ;
1135
1139
if ( listView != null )
1136
1140
{
1137
- var tvi = SelectedItem as TabViewItem ;
1138
- if ( tvi == null )
1139
- {
1140
- tvi = ContainerFromItem ( SelectedItem ) as TabViewItem ;
1141
- }
1142
-
1143
- if ( tvi != null )
1144
- {
1145
- listView . SelectedItem = tvi ;
1146
-
1147
- // Setting ListView.SelectedItem will not work here in all cases.
1148
- // The reason why that doesn't work but this does is unknown.
1149
- tvi . IsSelected = true ;
1150
- }
1141
+ listView . SelectedItem = SelectedItem ;
1142
+ //var tvi = SelectedItem as TabViewItem;
1143
+ //if (tvi == null)
1144
+ //{
1145
+ // tvi = ContainerFromItem(SelectedItem) as TabViewItem;
1146
+ //}
1147
+
1148
+ //if (tvi != null)
1149
+ //{
1150
+ // listView.SelectedItem = tvi;
1151
+
1152
+ // // Setting ListView.SelectedItem will not work here in all cases.
1153
+ // // The reason why that doesn't work but this does is unknown.
1154
+ // tvi.IsSelected = true;
1155
+ //}
1151
1156
}
1152
1157
}
1153
1158
0 commit comments