先来看看本次的使用场景吧,简单来说就是一个下拉框控件绑定了键值对列表,显示的是其中的键,但是要求是支持国际化(多语言),如下图:
由于要支持多语言,所以键值对的键不是直接显示的值,而是显示值的资源键...:
///
/// 时间列表
///
public ObservableCollectionKeyValuePairstring, int>> TimeList...{ get; set; } = new ObservableCollectionKeyValuePairstring, int>>()
{
new KeyValuePairstring,...KeyValuePairstring, int>("LockTime-TenMinute", 10),
new KeyValuePairstring, int>("LockTime-FifteenMinute...", 15),
new KeyValuePairstring, int>("LockTime-ThirtyMinute", 30),
new KeyValuePairstring,