Mam następujący problem, moim zdaniem Mam Listview. W tym liście chciałbym mieć dwa przyciski. Jeden do edycji przedmiotu, drugi do usunięcia.Wiązanie polecenia przycisku Xamarin Forms wewnątrz ListView
Oto mój ListView w XAML
<ListView Grid.Row="1" x:Name="ArbeitsEinträgeList" ItemsSource="{Binding EintragList}" SelectedItem="{Binding SelectedItem}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Text="{Binding Titel}" TextColor="{Binding Fehlerhaft, Converter={StaticResource EintragartConverter}}"></Label>
<Label Grid.Column="1" Text="{Binding Beginn}" TextColor="{Binding BeginnManuell, Converter={StaticResource EintragartConverter}}"></Label>
<Label Grid.Column="2" Text="{Binding Ende}" TextColor="{Binding EndeManuell, Converter={StaticResource EintragartConverter}}"></Label>
<Button Grid.Column="3" Command="{Binding EditEintragCommand}" Text="" FontFamily="../Ressources/fontawesome.ttf#FontAwesome"></Button>
<Button Grid.Column="4" Command="{Binding DeleteEintragCommand}" Text="" FontFamily="../Ressources/fontawesome.ttf#FontAwesome"></Button>
</Grid>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
W moim ViewModel jest wszystko, czego potrzebuję, ja testowałem polecenia z przycisku nie w ListView i działa idealnie.
Gdybym najedź wiążącego się komunikat „Nie można rozwiązać symbol«...»” pojawia
Dziękuję bardzo. Twoje rozwiązanie działa. Kciuki w górę :) – JanMer
Co zrobić, jeśli 'DataTemplate' jest zdefiniowany z innego pliku i pobrany w ten sposób:' '? –
mr5