How to use DataTemplateSelector with ContentControl to display different controls based on the view-model?
问题 I want to create a simple window that would display different controls ( SpinEdit or TextEdit ) based on the view-model that is selected. I have the code and logic behind it done already, what is left is displaying the control ( SpinEdit or TextEdit ) itself. XAML: <dx:DXWindow.Resources> <DataTemplate x:Key="DataTemplate_Value"> <dxe:SpinEdit Height="23" MinWidth="200" Width="Auto" Text="{Binding Path=Value, Mode=TwoWay}" Mask="{Binding Mask, Mode=OneWay}" MaxLength="{Binding Path