WPF Binding to alternate static resource
问题 I am attempting to bind a static resource to a view model item based on the state of the item. There is in a list of items in the view. The ViewModel has a boolean property State. The View has a ItemsControl bound to an ObservableCollection I have two resource strings defined for each of the items required. How do I display the correct string based on the value of State? Thanks, Eric 回答1: To use the static resource you can use ObjectDataProvider . And to bind it to your View based on the