Yoda
Yoda

Reputation: 18068

Java's JPanel with GridLayout equivalent in WPF's XAML

I would like declare in the XAML file a container that when I add any component to i it will behave like JPanel with GridLayout in Java. That means every component in that container will be the same size no matter I do.

Upvotes: 0

Views: 694

Answers (1)

Kishore Kumar
Kishore Kumar

Reputation: 12874

You can use UniformGrid in WPF

<UniformGrid>
    <Button Content="Hello1"/>
    <Button Content="Hello2"/>
    <Button Content="Hello3"/>
    <Button Content="Hello4"/>
    <Button Content="Hello5"/>
    <Button Content="Hello6"/>
</UniformGrid>

Uniform Grid Demo

More info about UniformGrid here

http://msdn.microsoft.com/en-us/library/system.windows.controls.primitives.uniformgrid(v=vs.110).aspx

Upvotes: 1

Related Questions