none
ClipToBounds not allowing an element to be clickable outside parent boundaries RRS feed

  • Question

  • I have my control hierarchy as given below from parent -> child

    ScrollViewer(width: 300px) -> Grid (width: 200px)-> TextBox(width:100px, partial overlaping on parent Grid)

    I have ClipToBounds all false for every control and Textbox is partially on Grid in UI(by adjusting the margins) and Partially on ScrollViewer (as it appeared)

    I am not able to click/select/any kind of interaction with Textbox appearing outside the Grid. Event the textbox content is visible till Grid overlapping area then goes invisible.

    Can anyone suggest how can I have this textbox control work appropriately outside the grid dimensions


    Sachin Mehndiratta

    Monday, April 9, 2018 4:56 AM

Answers

  • Hi Yong Lu

    Thanks for looking into this. I have solved this issue. 

    I override the GetLayoutClip method to return null and avoid the default clipping geometry.


    Sachin Mehndiratta

    Friday, April 20, 2018 3:10 AM

All replies

  • Hi   Sachin Mehndiratta,

    It is hardly to point the special reason for this issue. Could you provide a minimal code sample (Use as little code as possible that still produces the same problem) that we can use it to reproduce the problem.


    Best Regards,

    Yong Lu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 10, 2018 6:47 AM
    Moderator
  • Hi Yong Lu

    Thanks for looking into this. I have solved this issue. 

    I override the GetLayoutClip method to return null and avoid the default clipping geometry.


    Sachin Mehndiratta

    Friday, April 20, 2018 3:10 AM