Skip to content

Handling ListBoxItem DoubleTap on whole area #7182

Answered by mysteryx93
mysteryx93 asked this question in Q&A
Discussion options

You must be logged in to vote

OK Got it thanks

<ListBox.Styles>
    <Style Selector="ListBoxItem">
        <Setter Property="Padding" Value="0" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    </Style>
</ListBox.Styles>
<ListBox.ItemTemplate>
    <DataTemplate>
        <TextBlock Text="{Binding Name}" Padding="14" Background="Transparent">
            <i:Interaction.Behaviors>
                <ia:EventTriggerBehavior EventName="DoubleTapped">
                    <ia:InvokeCommandAction
                        Command="{Binding ViewModel.PlayListCommand, RelativeSource={RelativeSource AncestorType={x:Type Window}}}" />
                </ia:EventTriggerBehavior>
            </i:Interaction…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@mysteryx93
Comment options

@maxkatz6
Comment options

Comment options

You must be logged in to vote
2 replies
@alexhelms
Comment options

@alexhelms
Comment options

Answer selected by mysteryx93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants