iPhone like red badge notification in a WPF project?

前端 未结 5 1982
时光说笑
时光说笑 2020-12-28 10:27

I have a C# WPF project which generates daily and weekly reports automatically. I want to inform the user when new reports are available, so I thought of a badge like on the

5条回答
  •  情书的邮戳
    2020-12-28 11:05

    Use a Border element and place your text within it. You can set the CornerRadius property for the Border appropriately so that it looks like a circle (or a rounded-rectangle shape, in case the number is bigger).

    Here's a first cut, which exploits the fact that CornerRadius will get clamped to half the height or width in Y and X respectively:

     
        125
     
    

提交回复
热议问题