Solved

Min width and max width  in Scrollviewer control

Posted on 2011-05-04
2
886 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

813 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

13 Experts available now in Live!

Get 1:1 Help Now