Windows API Code Pack TaskDialog missing icon

前端 未结 2 903
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-21 06:58

The icons in my TaskDialog are missing:

\"\"

And in the taskbar:

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-21 07:50

    I've found a workaround to this. Apparently it is a bug in the API itself.

    taskDialog.Opened += new EventHandler(taskDialog_Opened);
    
    ...
    
    public void taskDialog_Opened(object sender, EventArgs e)
    {
        TaskDialog taskDialog = sender as TaskDialog;
        taskDialog.Icon = taskDialog.Icon;
        taskDialog.FooterIcon = taskDialog.FooterIcon;
        taskDialog.InstructionText = taskDialog.InstructionText;
    }
    

提交回复
热议问题