开发者

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!)


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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜