Disable WPF label accelerator key (text underscore is missing)

前端 未结 4 2064
逝去的感伤
逝去的感伤 2020-11-27 06:40

I am setting the .Content value of a Label to a string that contains underscores; the first underscore is being interpreted as an accelerator key.

Witho

4条回答
  •  难免孤独
    2020-11-27 06:52

    You could override the RecognizesAccessKey property of the ContentPresenter that is in the default template for the label. For example:

    
      
        
          
        
        
      
    
    

提交回复
热议问题