Solved

Min width and max width  in Scrollviewer control

Posted on 2011-05-04
2
906 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

726 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