GorillaApe
GorillaApe

Reputation: 3641

WPF How to make "layer"

I am developing a small appplication which is single windowed... I have formated everything with care .. The window contains a grid which has 2 columns.. The second is auto and the first is of type *.(takes the remaining space)

Is there a way to change the content of the first column ?(to display a chart for example) The only solution i can think is a tabcontrol with invisible tabs to switch programmatically, or create a custom user control and place it somehow..but the last solution i think sucks because the content i want to display isnt just a user control.. In java i could do this very easilly,is there any solution here?(i dont want to mess the design view!)

Upvotes: 1

Views: 475

Answers (1)

flq
flq

Reputation: 22859

You could

  • put a <ContentControl> in XAML where you want to exchange contents.
  • give it a name (x:Name)
  • Now you can target the control. It supports IAddChild such that you can attach any child object to be displayed.

Upvotes: 2

Related Questions