V
Vivien Parlat
Hello,
I'm trying to create a custom panel in WPF, which would act like a
WrapPanel but with a "NewLine" option. So I'm trying to create kinda
"StackPanel" which would host WrapPanels.
Tutorials on custom Panels over the internet talk a lot about creating
a new Panel from scratch, overriding MeasureOverride and
ArrangeOverride. However, all that i want to do is to "route" any new
UIElement to the current row's WrapPanel.
The goal is, finally, to display this as:
<myPanel>
<Item1>
<Item2>
<NewLine>
<Item3>
</myPanel>
which would be internally stored as:
<StackPanel>
<WrapPanel>
<Item1>
<Item2>
</WrapPanel>
<WrapPanel>
<Item3>
</WrapPanel>
</StackPanel>
I can't figure out how to do. I tried to override ArrangeOverride but
have problems with Child and visual tree. Is there an easy way to do
this ?
Thanks in advance...
I'm trying to create a custom panel in WPF, which would act like a
WrapPanel but with a "NewLine" option. So I'm trying to create kinda
"StackPanel" which would host WrapPanels.
Tutorials on custom Panels over the internet talk a lot about creating
a new Panel from scratch, overriding MeasureOverride and
ArrangeOverride. However, all that i want to do is to "route" any new
UIElement to the current row's WrapPanel.
The goal is, finally, to display this as:
<myPanel>
<Item1>
<Item2>
<NewLine>
<Item3>
</myPanel>
which would be internally stored as:
<StackPanel>
<WrapPanel>
<Item1>
<Item2>
</WrapPanel>
<WrapPanel>
<Item3>
</WrapPanel>
</StackPanel>
I can't figure out how to do. I tried to override ArrangeOverride but
have problems with Child and visual tree. Is there an easy way to do
this ?
Thanks in advance...