I have two buttons in DataTemplate. It is necessary to bind them to an int property so that, by pressing one button, the variable increases, while the other decreases. Dear experts, I ask for help.
<DataTemplate x:Key="PriceItems"> <StackPanel Background ="Azure" Orientation="Horizontal" Margin="10,10"> <Button x:Name="IncrementBtn" Content="+" FontSize="18" Width="80" /> <Label x:Name="CntLabel" Content="{Binding DataContext.TicketCnt, RelativeSource={RelativeSource TemplatedParent}}" VerticalContentAlignment="Center" HorizontalAlignment="Center" FontSize="16"/> <Button x:Name="DecrementBtn" Content="-" FontSize="18" Width="80" Margin="10,10"/> </StackPanel> </DataTemplate> 