Difference between StackPanel and RelativePanel ?



Difference between StackPanel and RelativePanel ?..

Answer / Sujata Gupta

In C#, both StackPanel and RelativePanel are used for layout purposes in WPF. However, they differ in their arrangement of child controls.nStackPanel arranges its children one above the other (vertical) or side by side (horizontal) with equal space between them as per the Orientation property. On the other hand, RelativePanel positions children relative to each other using attached properties.nRelativePanel is more flexible and allows for complex layouts where controls can be placed based on their relationship with other controls.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is difference between interface and abstraction?

1 Answers  


What happens if you add duplicate elements to a set?

1 Answers  


What is streamreader/streamwriter class?

1 Answers  


Using system; class main { public static void Main() { int a = 1; for (int i = 0; i < 10; i++) { int j = a * 5; Console.WriteLine(a + "*5=" + j); a++; } Console.ReadLine(); } }

1 Answers  


What is the base class in .net from which all the classes are derived from?

1 Answers  


How many bytes is an int c#?

1 Answers  


What is parallel foreach c#?

1 Answers  


What is wpf application in c#?

1 Answers  


Is c# substring zero based?

1 Answers  


What is tpl in c#?

1 Answers  


Explain publishers and subscribers in events.

1 Answers  


What is datacontract in c#?

1 Answers  


Categories