I did read some posts that talked about this and the HitTestMode
docs too, but I still can’t solve the problem with the following code.
This is a class that I use in a number of pages that shows some icons with which the user may send mails, share content, etc.
<Panel ux:Class="Icons" >
<DockPanel Alignment="Right" Margin="0,0,10,0">
<Image File="Assets/envelope.png" Dock="Left" Width="18">
<Clicked>
<LaunchEmail To="" Subject="{title}" CarbonCopy="" BlindCarbonCopy="" Message="{email_msg}" />
</Clicked>
</Image>
<Image File="Assets/phone-call.png" Dock="Left" Width="18" Margin="10,0,0,0" />
<Image File="Assets/share-1.png" Dock="Left" Width="18" Margin="10,0,0,0">
<Clicked Handler="{clickShare}"/>
</Image>
<Image File="Assets/unlink.png" Dock="Left" Width="18" Margin="10,0,0,0" />
<Image File="Assets/placeholder.png" Dock="Left" Width="18" Margin="10,0,0,0" />
</DockPanel>
</Panel>
The two Clicked
work fine. They launch the e-Mail and the Share modules but as soon as the user has finished writing the mail or sharing the content (or simply as he cancel the operation) the click
will propagate and the interaction will continue to the page that hosts this class.
I understand that I have to put a panel behind that blocks all other interactions, but I did not find the correct place where to put it:
First try:
<Panel ux:Class="Icons" >
<DockPanel>
[...]
</DockPanel>
<Panel HitTestMode="None" />
</Panel>
Second try:
<Panel ux:Class="Icons" >
<Panel>
<DockPanel>
[...]
</DockPanel>
</Panel>
<Panel HitTestMode="None" />
</Panel>
Third try:
<Panel>
<Image File="Assets/share-1.png" Dock="Left" Width="18" Margin="10,0,0,0">
<Clicked Handler="{clickShare}"/>
</Image>
<Panel>
<Panel HitTestMode="None" />