Results 1 to 4 of 4

Thread: Problem with ScrollViewer

  1. #1
    Join Date
    Nov 2009
    Posts
    652

    Problem with ScrollViewer

    I am using the WPF form with a WindowsFormsHost . My screen resolution is set to the 1280x800. And the UserControl which i created based on windows form. When i add the same to the WindowsFormsHost every thing is working fine. I put the ScrollViewer to the WPF form and set its visibility of vertical scrollbar to auto it works properly but when i set the same for the horizontal scrollbar then no scroll bar is visible that time. Now i need your help to sort the problem of scrollviewer.

    Thank you

  2. #2
    Join Date
    May 2008
    Posts
    4,831

    Re: Problem with ScrollViewer

    I think the problem is because your code does not have the HorizontalScrollBarVisibility set to auto. So first check for the same because you did not forwarded us the code so all i can do is just predict and nothing else. It happen when the ScrollViewer doesn't perceive it's content as being larger than its current bounds to have it necessary. Try to set to the visible. All i can help you is this much only. If It is not working then let me know.

    Bye

  3. #3
    Join Date
    May 2008
    Posts
    4,570

    Re: Problem with ScrollViewer

    Hi,

    I am having the same problem with the horizontal scroll viewer which is not visible at the time of the running of the program. That i solved with moving the ScrollViewer position, so do the same for your program it might be helpful for you. Delete the canvas and move the ScrollViewer inside the Grid. And do one more thing just delete the height and width of the ScrollViewer. This will automatically resize the grid.

    Thanks.

  4. #4
    Join Date
    May 2008
    Posts
    4,345

    Re: Problem with ScrollViewer

    All i can give you the definition and the format of the ScrollViewer class so that you can apply the same to your program and see whether it is working or not.

    Code:
    <LocalizabilityAttribute(LocalizationCategory.Ignore)> _
    <TemplatePartAttribute(Name := "PART_HorizontalScrollBar", Type := GetType(ScrollBar))> _
    <TemplatePartAttribute(Name := "PART_VerticalScrollBar", Type := GetType(ScrollBar))> _
    <TemplatePartAttribute(Name := "PART_ScrollContentPresenter", Type := GetType(ScrollContentPresenter))> _
    Public Class ScrollViewer _
    Inherits ContentControl
    ScrollViewer is not entirely visible, the ScrollViewer displays scrollbars that the user can use to move the content areas that are visible. The area that includes all of the content of the ScrollViewer is the extent. The visible area of the content is the viewport.

    For more info click here

Similar Threads

  1. Sony VGNCS3 laptop 15 inch screen problem...LCD or CHIP problem?
    By Mick$Tyler in forum Hardware Peripherals
    Replies: 5
    Last Post: 31-10-2010, 06:49 AM
  2. Replies: 6
    Last Post: 27-07-2010, 12:10 AM
  3. hard disk problem, clicking sound and windows problem
    By rajat_2589 in forum Hardware Peripherals
    Replies: 1
    Last Post: 16-06-2010, 11:34 PM
  4. Replies: 4
    Last Post: 10-04-2010, 04:19 PM
  5. AD problem in Server 2003, Userenv Event ID 1053 problem
    By Victor Kam in forum Active Directory
    Replies: 3
    Last Post: 24-09-2007, 04:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,034,308.98759 seconds with 17 queries