How to do the opposite in Width = "150 *" in WPF?

I would like the Width attribute to expand dynamically until it reaches 150, and after that the user should be able to expand it further by dragging and dropping (MaxWidth will not allow this).

Width="150*"

It has similar functionality, but in the opposite direction (the minimum width and, if necessary, expands). I want to "expand as needed" and the maximum expansion width.

Can this be done using XAML?

+3
source share
2 answers

, , . Cursor "SizeWE" , , . , . MouseDown CaptureMouse() . , , , 150, , reset . MouseUp ReleaseMouse() .

, .

0

. GridLength, 150

private GridLength _marquee1Width = new GridLength(150, GridUnitType.Pixel);

GridUnitType.Pixel, GridUnitType.Auto GridUnitType.Star

0

All Articles