Solved

Min width and max width  in Scrollviewer control

Posted on 2011-05-04
2
872 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
Comment Utility
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
Comment Utility
thankyou
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

6 Experts available now in Live!

Get 1:1 Help Now