Jitendra Jadav
Jitendra Jadav

Reputation: 93

How I can find MouseClick or GotFocus event in PivotItem.?

Hello How I can find GotFocus event into the PivotItem I had tired with GalaSoft Interaction with Triger and EventName="GotFocus" but it is not fired can anybody help me to find the PivioItem Event.

Thank you.

Upvotes: 1

Views: 344

Answers (2)

JuanluElGuerre
JuanluElGuerre

Reputation: 77

Yes,

here you are the solution:

<controls:Pivot Title="My Pivot">
<i:Interaction.Triggers>
    <i:EventTrigger EventName="SelectionChanged">
        <i:InvokeCommandAction Command="{Binding EuropePivotSelectedCommand}" />
    </i:EventTrigger>
</i:Interaction.Triggers>

<controls:PivotItem Header="item1">
</controls:PivotItem>

<controls:PivotItem Header="item2">
</controls:PivotItem>

Regards Juanlu, ElGuerre

Upvotes: 0

TutuGeorge
TutuGeorge

Reputation: 2012

the pivot item gets focus upon cliking any control placed inside that pivot item.

<controls:PivotItem Header="item1">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="GotFocus">
                        <i:InvokeCommandAction Command="{Binding ShowMessageCommand}" />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
                <Grid>
                    <TextBox Height="100"
                             Width="200"/>
                    <Button Height="100"
                            Width="200" />
                </Grid>
            </controls:PivotItem>

This code works for me. the pivot item get focus upon clicking the button or the text box. Hope this helps you.

Upvotes: 1

Related Questions