0
I’m having difficulty implementing an effect where when I hover over the item on the screen the speed should be 0. And without the mouse above should be back to 30. Use WPF using MVVM structure, so events cannot be in the Class.xaml.Cs class I need an idea on the subject. Thank you!
<common:BrnN Grid.Row="1"
ItemsSource="{Binding Items}"
Speed="30"
Background="Black">
<common:BrnN.ItemTemplate>
<DataTemplate>
<Button Background="Transparent"
BorderThickness="0"
Margin="20, 0"
Padding="0"
Command="{Binding RelativeSource={RelativeSource AncestorType=common:BrN}, Path=DataContext.TagCommand}"
CommandParameter="{Binding}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Descricao}"
Foreground="Gold"
FontSize="18"
FontWeight="Semibold" />
<TextBlock Text=": "
Foreground="Gold"
FontSize="18"
FontWeight="Semibold" />
<TextBlock Text="{Binding Valor, StringFormat=F2}"
Foreground="Gold"
FontSize="18"
FontWeight="Semibold" />
</StackPanel>
</Button>
</DataTemplate>
</common:BrnN.ItemTemplate>
Search for "wpf Event to command".
– ramaral