forum

Home / DeveloperSection / Forums / XAML - Use different template based on class

XAML - Use different template based on class

Anonymous User193325-Sep-2013

I have a nested datagrid. The grid is bound to a EquipmentListViewModel, which then contains a list of EquipmentViewModels. Each row can be dropped down by clicking a "+" button which will display a list of Frequencies for that equipment. I want to be able to display different RowDetailsTemplates depending on the CLASS of the row. The following is an example of what I want to do:

 -BaseClass(Hit + button to dropdown equipment list below)

   -EquipmentTypeA(Should have a + button to drop down, is of class "TypeA")

       -Frequencies          

   -EquipmentTypeB(Doesnt contain a + buton, so it is different than EquipmentTypeA, of class "TypeB")

How can I have BaseClass contain a list of EquipmentTypes, where each row implements a derived class from the EquipmentTypes base class(TypeA,TypeB,etc). This way I can have each row have custom code depending on its class type(if it should contain a button, etc).


Updated on 25-Sep-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By