madlan
madlan

Reputation: 1397

Anchoring two controls + centre

I am trying to anchor two progress but I can't see a way to get the desired result. I want the left progress bar to be anchored to the left, right bar to the right with the centre fixed (as imaged below)

enter image description here (Bottom image shows resized form)

I've tried putting the controls on a docked panel with various anchor points but I cannot get the desired result, any idea?

Upvotes: 2

Views: 180

Answers (1)

DeadDog
DeadDog

Reputation: 241

I would suggest that you use a SplitContainer and add a progress bar to each panel. Anchor the bars on both left and right and then ensure that the splitter is placed in the middle of the container. If the user shouldn't be allowed to subsequently move the splitter, set

splitContainer1.IsSplitterFixed = false

Upvotes: 3

Related Questions