c# - Wpf User Control scale problem -


I have a user control in which it has 5 rectangles when I use it, then I resize this control I would like to, but when I keep it in designer and resize it there, the revenues are not on the scale with control, they are only covered or do not expand. It seems that it should be very simple, but it has to tempt me

   & Lt; /UserControl.Resources> & Lt; UserControl.Triggers & gt; & Lt; Event Trigger Routing Avent = "Framework Element. Loaded" & gt; & Lt; StartStoryboard Storyboard = "{Static Resources Anne}" /> & Lt; / EventTrigger & gt; & Lt; /UserControl.Triggers> & Lt; Grid margin = "0,0,8,8" D: layoutoverride = "horizontal alignment" & gt; & Lt; Grid.ColumnDefinitions & gt; & Lt; ColumnDefinition / & gt; & Lt; /Grid.ColumnDefinitions> & Lt; Grid X: Name = "Grid Con" margin = "14,13,8,8" & gt; & Lt; Rectangle x: name = "rectangle" stroke = "black" margin = "0,0,111,14.333" vertical alignment = "bottom" height = "2 9" & gt; & Lt; Rectangle.Fill & gt; & Lt; LinearGradientBrush EndPoint = "0.5,1" Start Page = "0.5,0" & gt; & Lt; GradientStop Color = "Black" /> & Lt; GradientStop color = "# FF3B46B5" offset = "1" /> & Lt; / LinearGradientBrush & gt; & Lt; /Rectangle.Fill> & Lt; / Rectangles & gt; & Lt; Rectangle x: name = "rectangle 1" stroke = "black" margin = "23,0,88,14.333" vertical alignment = "bottom" height = "55" & gt; & Lt; Rectangle.Fill & gt; & Lt; LinearGradientBrush EndPoint = "0.5,1" Start Page = "0.5,0" & gt; & Lt; GradientStop Color = "Black" /> & Lt; GradientStop color = "# FF3B46B5" offset = "1" /> & Lt; / LinearGradientBrush & gt; & Lt; /Rectangle.Fill> & Lt; / Rectangles & gt; & Lt; Rectangle x: name = "rectangle-2" stroke = "black" margin = "46,0,64.96,14.333" vertical alignment = "bottom" height = "77" & gt; & Lt; Rectangle.Fill & gt; & Lt; LinearGradientBrush EndPoint = "0.5,1" Start Page = "0.5,0" & gt; & Lt; GradientStop Color = "Black" /> & Lt; GradientStop color = "# FF3B46B5" offset = "1" /> & Lt; / LinearGradientBrush & gt; & Lt; /Rectangle.Fill> & Lt; / Rectangles & gt; & Lt; Rectangle x: name = "rectangle3" stroke = "black" margin = "69.04,0,41.96,14.333" vertical alignment = "bottom" height = "105" & gt; & Lt; Rectangle.Fill & gt; & Lt; LinearGradientBrush EndPoint = "0.5,1" Start Page = "0.5,0" & gt; & Lt; GradientStop Color = "Black" /> & Lt; GradientStop color = "# FF3B46B5" offset = "1" /> & Lt; / LinearGradientBrush & gt; & Lt; /Rectangle.Fill> & Lt; / Rectangles & gt; & Lt; Rectangle x: name = "rectangle" 4 stroke = "black" margin = "92.04,0,18.96,14.333" vertical alignment = "bottom" height = "136" & gt; & Lt; Rectangle.Fill & gt; & Lt; LinearGradientBrush EndPoint = "0.5,1" Start Page = "0.5,0" & gt; & Lt; GradientStop Color = "Black" /> & Lt; GradientStop color = "# FF3B46B5" offset = "1" /> & Lt; / LinearGradientBrush & gt; & Lt; /Rectangle.Fill> & Lt; / Rectangles & gt; & Lt; / Grid & gt; & Lt; / Grid & gt;  

Answer from Microsoft's Ben Ronco:

"Place root grid in viewbox"

Just as simple as I thought it would be.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -