How to convert a character in to equivalent System.Windows.Input.Key Enum value?

前端 未结 4 1347
暗喜
暗喜 2020-11-28 15:58

I want to write a function like so,

        public System.Windows.Input.Key ResolveKey(char charToResolve)
        {
            // Code goes here, that reso         


        
4条回答
  •  抹茶落季
    2020-11-28 16:34

    Try using the ConvertFrom method of the System.Windows.Input.KeyConverter class.

提交回复
热议问题