[UWP] Fixes call Tapped event ListView (#3400) fixes #2318 fixes #4901

- fixes EntryCellTextBox template
This commit is contained in:
Pavel Yakovlev 2019-02-12 16:13:58 +03:00 коммит произвёл Rui Marinho
Родитель 2c3df0ac0e
Коммит 4c720530e6
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -722,9 +722,9 @@ namespace Xamarin.Forms.Platform.UWP
List.SelectedIndex = index;
}
void OnListItemClicked(int index)
void OnListItemClicked(int index, Cell cell = null)
{
Element.NotifyRowTapped(index, cell: null);
Element.NotifyRowTapped(index, cell);
_itemWasClicked = true;
}
@ -735,7 +735,7 @@ namespace Xamarin.Forms.Platform.UWP
var templatedItems = TemplatedItemsView.TemplatedItems;
var selectedItemIndex = templatedItems.GetGlobalIndexOfItem(e.ClickedItem);
OnListItemClicked(selectedItemIndex);
OnListItemClicked(selectedItemIndex, e.ClickedItem as Cell);
}
}

Просмотреть файл

@ -318,7 +318,7 @@
<uwp:EntryCellTextBox IsEnabled="{Binding IsEnabled}" Header="{Binding}" Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextAlignment="{Binding HorizontalTextAlignment,Converter={StaticResource HorizontalTextAlignmentConverter}}" PlaceholderText="{Binding Placeholder}" InputScope="{Binding Keyboard,Converter={StaticResource KeyboardConverter}}" HorizontalAlignment="Stretch">
<uwp:EntryCellTextBox.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Label}" Style="{ThemeResource BaseTextBlockStyle}" Foreground="{Binding LabelColor, Converter={StaticResource ColorConverter}, ConverterParameter=DefaultTextForegroundThemeBrush}" />
<TextBlock Text="{Binding Label}" IsHitTestVisible="False" Style="{ThemeResource BaseTextBlockStyle}" Foreground="{Binding LabelColor, Converter={StaticResource ColorConverter}, ConverterParameter=DefaultTextForegroundThemeBrush}" />
</DataTemplate>
</uwp:EntryCellTextBox.HeaderTemplate>
</uwp:EntryCellTextBox>