Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Min width and max width  in Scrollviewer control

Posted on 2011-05-04
2
Medium Priority
?
933 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 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

618 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