Solved

Min width and max width  in Scrollviewer control

Posted on 2011-05-04
2
883 Views
Last Modified: 2013-11-12
Can you please explain Minwidth and MaxWidth properties in Scroll viewer control

How scroll bar will behave based on minwidth and  maxwidth
0
Comment
Question by:N_Sri
2 Comments
 
LVL 11

Accepted Solution

by:
saragani earned 500 total points
ID: 35693473
I think you are talking about the properties that are common to all FrameworkElements

Unlike Winforms, Elements (unless you define in XAML) doesn't have the Width and Height set (You will see NaN if you inspect those properties).

When the UI drawing itself, it asks each of each children for their desired sizes and each child asks it's children the same thing.

MinWidth means that the width of the scrollbar will not be less than the width you have define.
The same applies to MaxWidth, MinHeight and MaxHeight.

After the element is being measured, it's parent gets his desired size by a property called DesizedSize, and when the actual width and heights of the elements will be reflected at ActualWidth and ActualHeight.

It should not affect the behavior of the scrollbar, but you should not set the Min and Max sizes for the scrollviewer.

Let the content which inside it, and the UI that wraps the scrollviewer to decide the size of the scrollviewer.
0
 

Author Closing Comment

by:N_Sri
ID: 35694189
thankyou
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now