【问题标题】:Creating a collapsed tray bar in with hardcodet wpf notify icon extension使用硬编码 wpf 通知图标扩展创建折叠的托盘栏
【发布时间】:2016-01-14 10:00:02
【问题描述】:

在我的应用程序中,我使用来自 hardcodet.net 的 wpf 通知图标扩展。

使用此扩展程序,我会定期创建自定义气球通知。为此,我需要一个任务栏图标对象。但在我的情况下,我无法使用应用程序的主任务栏图标。我必须使用存储在折叠窗口中的任务栏图标。这样气球图标就会显示在任务栏上方而不是下方。

现在我的问题。在上面的代码中可以看到任务栏图标的可见性属性设置为折叠。

<Window x:Class="center_approver_client_traybar_service.HiddenWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:tb="http://www.hardcodet.net/taskbar"
        Title="HiddenWindow" Height="300" Width="300" Visibility="Collapsed">
    <Grid>
        <tb:TaskbarIcon x:Name="HiddenWindowTrayIcon" Visibility="Collapsed" />
    </Grid>
</Window>

但是当我在我的应用程序中使用任务栏图标来显示自定义气球通知时。显示的是一个空的任务栏图标,但什么也没有。

有人可以帮帮我吗?

【问题讨论】:

    标签: c# wpf notifyicon


    【解决方案1】:

    您必须为 TaskbarIcon 控件设置图标,例如:

    <tb:TaskbarIcon x:Key="TrayIcon" IconSource="yurIcon.ico" ToolTipText="your tooltip">
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-01
      • 2015-03-29
      • 1970-01-01
      • 2017-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-27
      相关资源
      最近更新 更多