Click here to Skip to main content
15,896,730 members
Home / Discussions / WPF
   

WPF

 
QuestionWhat Is A HitTest? Pin
Kevin Marois7-Apr-11 5:35
professionalKevin Marois7-Apr-11 5:35 
AnswerRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 6:27
mvePete O'Hanlon7-Apr-11 6:27 
GeneralRe: What Is A HitTest? Pin
Kevin Marois7-Apr-11 6:32
professionalKevin Marois7-Apr-11 6:32 
GeneralRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 6:38
mvePete O'Hanlon7-Apr-11 6:38 
GeneralRe: What Is A HitTest? Pin
Kevin Marois7-Apr-11 6:40
professionalKevin Marois7-Apr-11 6:40 
GeneralRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 6:51
mvePete O'Hanlon7-Apr-11 6:51 
GeneralRe: What Is A HitTest? Pin
Kevin Marois7-Apr-11 6:52
professionalKevin Marois7-Apr-11 6:52 
GeneralRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 8:29
mvePete O'Hanlon7-Apr-11 8:29 
One more thing Kevin, and I apologise for not mentioning it. Setting IsHitTestVisible="false" on a container affects the children of the container as well. This is something to be very careful of because you can find that your hit testing doesn't behave quite the way you'd think it does by things higher up the tree. Here's a test for you to try:
XML
<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="HitTester.MainWindow"
  x:Name="Window"
  Title="Hit testable window"
  Width="788" Height="621">

  <Canvas IsHitTestVisible="False">
    <Button Content="Button" Width="75" IsHitTestVisible="True" />
  </Canvas>
</Window>

I'm not a stalker, I just know things. Oh by the way, you're out of milk.

Forgive your enemies - it messes with their heads


My blog | My articles | MoXAML PowerToys | Onyx


GeneralRe: What Is A HitTest? Pin
Kevin Marois7-Apr-11 8:45
professionalKevin Marois7-Apr-11 8:45 
JokeRe: What Is A HitTest? Pin
Mycroft Holmes7-Apr-11 14:40
professionalMycroft Holmes7-Apr-11 14:40 
GeneralRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 21:51
mvePete O'Hanlon7-Apr-11 21:51 
GeneralRe: What Is A HitTest? Pin
Mycroft Holmes7-Apr-11 22:14
professionalMycroft Holmes7-Apr-11 22:14 
QuestionMessage: The name already exists in the tree: Pin
Vimalsoft(Pty) Ltd6-Apr-11 23:42
professionalVimalsoft(Pty) Ltd6-Apr-11 23:42 
AnswerRe: Message: The name already exists in the tree: Pin
Abhinav S7-Apr-11 18:14
Abhinav S7-Apr-11 18:14 
GeneralRe: Message: The name already exists in the tree: [modified] Pin
Vimalsoft(Pty) Ltd7-Apr-11 18:48
professionalVimalsoft(Pty) Ltd7-Apr-11 18:48 
GeneralRe: Message: The name already exists in the tree: Pin
Pete O'Hanlon7-Apr-11 22:15
mvePete O'Hanlon7-Apr-11 22:15 
GeneralRe: Message: The name already exists in the tree: Pin
Vimalsoft(Pty) Ltd8-Apr-11 1:13
professionalVimalsoft(Pty) Ltd8-Apr-11 1:13 
GeneralRe: Message: The name already exists in the tree: Pin
Abhinav S8-Apr-11 8:20
Abhinav S8-Apr-11 8:20 
GeneralRe: Message: The name already exists in the tree: Pin
Vimalsoft(Pty) Ltd8-Apr-11 10:12
professionalVimalsoft(Pty) Ltd8-Apr-11 10:12 
QuestionLogical vs Visual Tree Pin
devvvy6-Apr-11 21:45
devvvy6-Apr-11 21:45 
AnswerRe: Logical vs Visual Tree Pin
Pete O'Hanlon6-Apr-11 22:06
mvePete O'Hanlon6-Apr-11 22:06 
GeneralRe: Logical vs Visual Tree Pin
devvvy6-Apr-11 22:25
devvvy6-Apr-11 22:25 
GeneralRe: Logical vs Visual Tree Pin
Pete O'Hanlon6-Apr-11 22:28
mvePete O'Hanlon6-Apr-11 22:28 
AnswerRe: Logical vs Visual Tree Pin
Pete O'Hanlon6-Apr-11 23:37
mvePete O'Hanlon6-Apr-11 23:37 
GeneralRe: Logical vs Visual Tree Pin
devvvy7-Apr-11 2:05
devvvy7-Apr-11 2:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.