everyone, I would like to add an Itemsource to a button so that I can access the sub-values. If I do the whole thing with ItemsControl, I get a button for each value. However, I only need one button. Can i limit this?
My Output: 30 Buttons -> I need 1.
My WPF Code:
<ItemsControl ItemsSource="{Binding Rechte}" >
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel>
<Button Content="Löschen" Command="{Binding FoerderLoeschen}" FontSize="{Binding SelectedFont, UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding Rechte.CanDelFPFoer, Converter={StaticResource BoolToVis}}" Padding="5 5 5 5" Margin="5 15 5 0"/>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>