实际上,我想要的是类似于Skype的功能。如果有人在Skype上发送了两条消息,你会在最小化的Skype窗口上看到数字“2”。因此,我想知道如何在您的C#应用程序的最小化窗口上显示数字/计数?
实际上,我想要的是类似于Skype的功能。如果有人在Skype上发送了两条消息,你会在最小化的Skype窗口上看到数字“2”。因此,我想知道如何在您的C#应用程序的最小化窗口上显示数字/计数?
// draw an image to overlay
var dg = new DrawingGroup();
var dc = dg.Open();
dc.DrawEllipse(Brushes.Blue, new Pen(Brushes.LightBlue, 1), new Point(8, 8), 8, 8);
dc.DrawText(new FormattedText("3", System.Threading.Thread.CurrentThread.CurrentUICulture, System.Windows.FlowDirection.LeftToRight,
new Typeface("Arial"), 16, Brushes.White), new Point(4, 0));
dc.Close();
var geometryImage = new DrawingImage(dg);
geometryImage.Freeze();
// set on this window
var tbi = new TaskbarItemInfo();
tbi.Overlay = geometryImage;
this.TaskbarItemInfo = tbi;