How to set/change/remove focus style on a Button in C#?

后端 未结 12 1145
鱼传尺愫
鱼传尺愫 2020-11-28 08:39

I have a couple of buttons of which I modified how they look. I have set them as flat buttons with a background and a custom border so they look all pretty and nothing like

12条回答
  •  伪装坚强ぢ
    2020-11-28 09:19

    There is another way which works well for flat styled buttons. Don't use buttons but labels. As you are completely replacing the UI for the button it does not matter whether your use a button control or a label. Just handle the click in the same way.

    This worked for me, although not great practice it is a good hack and as long as you name the button obviously (and comment the source) other coders will pick up the idea.

    Ryan

提交回复
热议问题