In a wpf app using c#, is it possible to somehow attach a listener or hook
into the IsMouseOver property so when ever it's value changes, a method
could be notified?

--
moondaddy@newsgroup.nospam

RE: Attach a listener to the IsMouseOver property by v-lliu

v-lliu
Fri May 09 05:44:49 CDT 2008

Hi Moondaddy,

This is a quick note to let you know that I'm performing research on this
issue and will get back to you ASAP.

I appreciate your patience!

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



RE: Attach a listener to the IsMouseOver property by v-lliu

v-lliu
Mon May 12 05:52:15 CDT 2008

Hi Moondaddy,

IMO, there's no way to attach a listener or hook into the IsMouseOver
property and get notified whenever this property changes.

Could you tell me why you'd like to do this? There may be other ways to get
what you really want.

I look forward to your reply.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



Re: Attach a listener to the IsMouseOver property by moondaddy

moondaddy
Wed May 14 13:08:16 CDT 2008

Thanks Linda,

Because I'm having a difficult time creating a control template or style on
a child element where I want to change some property settings based on it's
parent's IsMouseOver property value. also, if I could trap this, I could
add additional logic in the listening method in the child element. I'm
starting to completely rebuild my objects to get around this challenge so I
don't have a child which needs to know it's parent's condition. in short,
I'm flattening the 2 out so the parent and child are part of the same
object, which is a hack, but it's all I can come up with for now. lets
close this thread and I'll post more pointed questions in another thread.
Thanks again!


"Linda Liu[MSFT]" <v-lliu@online.microsoft.com> wrote in message
news:oUdPE5BtIHA.5848@TK2MSFTNGHUB02.phx.gbl...
> Hi Moondaddy,
>
> IMO, there's no way to attach a listener or hook into the IsMouseOver
> property and get notified whenever this property changes.
>
> Could you tell me why you'd like to do this? There may be other ways to
> get
> what you really want.
>
> I look forward to your reply.
>
> Sincerely,
> Linda Liu
> Microsoft Online Community Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>



Re: Attach a listener to the IsMouseOver property by v-lliu

v-lliu
Thu May 15 03:24:02 CDT 2008

Hi Moondaddy,

Thank you for your reply! I understand what you really want now.

You have posted a thread named "Style trigger not firing in wpf app" in the
microsoft.public.dotnet.languages.csharp newsgroup, in which you want the
child element to get notified when the IsMouseOver property of the parent
element is changed. I consider you discuss the same problem in this post
and that one.

I have replied to that post in the newsgroup.

The main reason why the style trigger is not fired is that the DataTrigger
you use in the "ConnectionGroupStyle" is not correct. You should use the
relative source mode of FindAncestor to get notified when the IsMouseOver
property of the parent element of the ChildControl changes.

In addition, in the SomeControl.xaml file, you shouldn't set the Visibility
property explicitly because it will override the style that is applied to
the element. You should set the initial value of the Visibility property in
the style.

I also provide the modified code in that thread. Please check my reply to
that thread for more details.

If you have any question, please reply to that thread in the newsgroup and
I will follow up with you in time.

Thank you for your cooperation!

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



Re: Attach a listener to the IsMouseOver property by moondaddy

moondaddy
Thu May 15 11:05:55 CDT 2008

You are right. Thanks.


"Linda Liu[MSFT]" <v-lliu@online.microsoft.com> wrote in message
news:XsciLUmtIHA.4408@TK2MSFTNGHUB02.phx.gbl...
> Hi Moondaddy,
>
> Thank you for your reply! I understand what you really want now.
>
> You have posted a thread named "Style trigger not firing in wpf app" in
> the
> microsoft.public.dotnet.languages.csharp newsgroup, in which you want the
> child element to get notified when the IsMouseOver property of the parent
> element is changed. I consider you discuss the same problem in this post
> and that one.
>
> I have replied to that post in the newsgroup.
>
> The main reason why the style trigger is not fired is that the DataTrigger
> you use in the "ConnectionGroupStyle" is not correct. You should use the
> relative source mode of FindAncestor to get notified when the IsMouseOver
> property of the parent element of the ChildControl changes.
>
> In addition, in the SomeControl.xaml file, you shouldn't set the
> Visibility
> property explicitly because it will override the style that is applied to
> the element. You should set the initial value of the Visibility property
> in
> the style.
>
> I also provide the modified code in that thread. Please check my reply to
> that thread for more details.
>
> If you have any question, please reply to that thread in the newsgroup and
> I will follow up with you in time.
>
> Thank you for your cooperation!
>
> Sincerely,
> Linda Liu
> Microsoft Online Community Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msdnmg@microsoft.com.
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>



Re: Attach a listener to the IsMouseOver property by v-lliu

v-lliu
Thu May 15 20:28:03 CDT 2008

Hi Moondaddy,

Thank you for your response!

Then how about the problem of "Style trigger not firing in wpf app" now?
Have you tried my suggestion?

If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.