ContentElement.IsMouseDirectlyOver Свойство
Определение
Получает значение, указывающее, соответствует ли позиция указателя мыши результатам проверки нажатия, при которой учитывается компоновка элемента.Gets a value that indicates whether the position of the mouse pointer corresponds to hit test results, which take element compositing into account.
public:
property bool IsMouseDirectlyOver { bool get(); };
public bool IsMouseDirectlyOver { get; }
member this.IsMouseDirectlyOver : bool
Public ReadOnly Property IsMouseDirectlyOver As Boolean
Значение свойства
Значение true
, если указатель мыши находится над тем же элементом, что и результат проверки нажатия; в противном случае — значение false
.true
if the mouse pointer is over the same element result as a hit test; otherwise, false
. Значение по умолчанию — false
.The default is false
.
Реализации
Комментарии
В отличие от IsMouseOverэто свойство true
только в том случае, если указатель мыши находится над элементом литерала, как для проверки попадания.Unlike IsMouseOver, this property is only true
if the mouse pointer is over the literal element - as it is for a hit test. Если указатель мыши находится вместо дочернего элемента, в частности над элементами, которые являются частью более глубокого шаблона элемента и компоновки, это свойство будет false
.If the mouse pointer is instead over a child element, in particular over elements that are part of an element's deeper template and compositing, this property will be false
. Если вы не знакомы с составным элементом управления (например, это свойство можно использовать в пользовательском шаблоне элемента управления для определяемого элемента управления), это свойство может возвращать непредвиденные результаты.Unless you know how a control is composited (for example, you use this property in a custom control template for a control that you define), this property might return unexpected results. В большинстве случаев, когда вы не создаете элементы управления, используйте вместо этого IsMouseOver.For most scenarios where you are not authoring controls, use IsMouseOver instead.
Если мышь захватывается данным элементом и это свойство true
на момент записи, это свойство будет продолжать возвращать true
до тех пор, пока захват мыши не будет потерян и указатель не поверх его границ.If the mouse is captured by this element, and this property is true
at time of capture, this property will continue to return true
until mouse capture is lost and the pointer is not over its bounds.
Сведения о свойстве зависимостейDependency Property Information
Поле идентификатораIdentifier field | IsMouseDirectlyOverProperty |
Для свойств метаданных задано значение true Metadata properties set to true |
ОтсутствуютNone |