In a WPF application of mine I have implemented a feature that makes specific items of a ComboBox readonly.
I was wondering if this was possible to to in a XamComboEditor as well? I don't want the complete control to be readonly. Just some of the items.
Hello Christian,
Thank you for your post. I have been looking into it and I can say that since you have already achieved this functionality for the ComboBox you can set this Style to the XamComboEditor’s ComboBoxStyle Property. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Hello Stefan,
If I understand you correctly, I would be able to modify the following code and use it in the xamComboEditor?
<ComboBox ItemsSource="{Binding Users}"DisplayMemberPath="Name" SelectedItem="{Binding Accessor, Mode=TwoWay}"> <ComboBox.Resources> <Style TargetType="{x:Type ComboBoxItem}"> <Style.Triggers> <DataTrigger Binding="{Binding IsCurrent}" Value="True"> <Setter Property="IsEnabled" Value="False" /> </DataTrigger> </Style.Triggers> </Style> </ComboBox.Resources></ComboBox>
UPDATE: I modified the code and it worked fine!
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.