Limit a scroller to not react to Key-Mouse-Input outside of his MaximumSize or MaximumSize of the parent

Last post 01-26-2010 11:08 AM by MSBob. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-19-2010 12:29 PM

    • DanB_DE
    • Not Ranked
    • Joined on 12-22-2008
    • Germany
    • New Member

    Limit a scroller to not react to Key-Mouse-Input outside of his MaximumSize or MaximumSize of the parent

    Hi, at my actual project I have a problem with some repeated items and a scroller object.

    Everything works as expected. The only problem I have is that the scrolled /repeated items still can be reached with the mouse or touch screen input outside of their panel or parent. The items are not visible when the leave the parent, but still react to input!

    My project is very big, so I was up to build a little sample to upload here. But then I found a small sample in the Sample Explorer called:

    Scroller / Scroller ViewItem

    It has the same behavior.

    When you start the sample and go with the mouse on the top or bottom outside the PaleGoldenrod Colorfill the scroller will react to it.

    I tried several settings I could think of, and now I am out of knowledge.

    How can I prevent that they items react to input outside there parents ?

    Please help,Many thanks, DanB# 
  • 01-22-2010 12:41 PM In reply to

    • MSBob
    • Top 200 Contributor
    • Joined on 12-02-2004
    • Member

    Re: Limit a scroller to not react to Key-Mouse-Input outside of his MaximumSize or MaximumSize of the parent

    You need to block out the areas outside of your scroller that you don't want interactive. The secret is setting mouseinteractive on the element you use to surround it. I use a transparent colorfill which makes things easy for debugging. Take a look at http://www.google.com/codesearch/p?hl=en#PfZv-Yd2vqU/Crystal/Markup/LayoutRoot.mcml line 547 for a working example of how to address this.

  • 01-23-2010 5:14 AM In reply to

    • DanB_DE
    • Not Ranked
    • Joined on 12-22-2008
    • Germany
    • New Member

    Re: Limit a scroller to not react to Key-Mouse-Input outside of his MaximumSize or MaximumSize of the parent

    Hi MSBob,

    thanks for your answer, i am really happy about it,first answer and solution!

    I will test it and give some feedback these days. i was testing a colorfill but without your mouseinteractive secret ;-)

    DanB
    #

  • 01-25-2010 4:08 PM In reply to

    • DanB_DE
    • Not Ranked
    • Joined on 12-22-2008
    • Germany
    • New Member

    Re: Limit a scroller to not react to Key-Mouse-Input outside of his MaximumSize or MaximumSize of the parent

    Hi MSBob,

    many thanks. It works exact how i needed. Its now marked with some comments and Thanks to you in the Source. :-)

    Greetings,

    DanB
    #

     

  • 01-26-2010 11:08 AM In reply to

    • MSBob
    • Top 200 Contributor
    • Joined on 12-02-2004
    • Member

    Re: Limit a scroller to not react to Key-Mouse-Input outside of his MaximumSize or MaximumSize of the parent

    Glad to hear it is working as expected. What project are you working on?

Page 1 of 1 (5 items)


Terms of Service | Privacy Statement | Code of Conduct | About