locked
WPF MultiView Control RRS feed

  • Question

  • Has anyone written a multi-view control for WPF?
    Specifically with the following functionality:

    • The control can contain multiple views.
    • The control has a "SelectedValue" property.
    • Each view has a "Value" property and a "Content" property.
      If a view's "Value" property matches its parent's "SelectedValue" property than its "Content" should be displayed.
    • It must have design-time support so that whatever view is being edited in code or in design mode its "Content" should be displayed.

    Any help would be appreciated.

    Michael

    • Edited by Michael Norton Monday, April 19, 2010 2:49 PM Spelling error
    Monday, April 19, 2010 6:16 AM

All replies

  • Hi Michael,

    > The control can contain multiple views.

    Could you please explain to me what is multiple view?

    > The control has a "SelectedValue" property.

    Seems you want to put some items on a panel. When you select an item, the SelectedValue property should return that item just like ListBox.

    > If a view's "Value" property matches its parent's "SelectedValue" property than its "Content" should be displayed.

    This is also not clear to me. Do you have any available controls to show me?

    Sincerely,
    Kira Qian
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework!
    Tuesday, April 20, 2010 7:50 AM
  • Please read about Multiview control here, it has some examples too. http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.multiview.aspx

    To me Michael's requirements were pretty clear. Multiview is a control available in ASP.net. It covers a pretty common senario where:

    • You have grouped controls logically - say Buy Item, Advertise, Swap Item
    • You ask the user to choose an address type using a DDL/radio button for instance
    • You want to show the appropriate controls based on the selection.
    Back in olden days we used to use Panels in Wind32 to achive this. You set selected index it will show appropriate panel and hides others.
    Friday, April 23, 2010 10:35 PM