-
Notifications
You must be signed in to change notification settings - Fork 965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Progress on Task Bar Entries #3851
Comments
|
WPF has an API for this already, I think the references are already included in .NET Core projects and you can just use it? (Once WPF and WinForms can be deployed separately it may make sense to have a WinForms-only version of the API, but as far as I'm aware in current deployment scenarios WPF and WinForms are always deployed together.) |
SummaryCurrently, Winforms does not offer an API to set the progress of a taskbar entry. @weltkante poited out that WPF already has a API for that. We try to add this capability to Winforms with this proposal. RationaleIn the past, developers had to use the WindowsAPICodePack's API for that. That API basically vanished from the internet and there are a lot of people trying to bring its APIs back to developers. While WPF got first-class support for some of that APIs, Winforms is still missing a lot of them. Proposed APIIt may be appropriate to offer a similar API surface like WPF. That API surface differs significantly from the original WindowsAPICodePack's API surface. namespace System.Windows.Forms {
class Form {
// ...
public TaskbarItemInfo TaskbarItemInfo { get; }
// ...
}
public class TaskbarItemInfo {
public TaskbarItemProgressState ProgressState { get; set; }
public double ProgressValue { get; set; }
}
public enum TaskbarItemProgressState
{
NoProgress = 0,
Indeterminate = 1,
Normal = 2,
Error = 4,
Paused = 8,
}
} Class DescriptionThe semantics of the classes are equivalent to the ones of WPF. The Future Entries into
|
This is a great feature suggestion, thanks so much! We'll put it on the backlog and do a holistic investigation of what else we might want out of the WindowsAPICodePack. |
@OliaG getting this on your radar for future discussion. |
Is there any time frame to expect this feature to be integrated in Microsoft.Windows.SDK.Contracts? |
@bkqc I'm not sure what you're asking for. Windows Forms has no relation Microsoft.Windows.SDK.Contracts, which contains WinRT API. |
Yes, WPF not only implements a progress bar, but also implements other features. TaskbarItemInfo.ThumbButtonInfos TaskbarItemInfo.Overlay |
Any news? |
Any chance this gets addressed in .NET 8 ? Also what does the champion-required label mean? Unlike the good first issue and help wanted labels, the champion-required is not explained in the CONTRIBUTING.md document. |
Sorry about the delay on this. We've been resource constrained this year, @lonitra is going to champion this for .NET 9. The "champion" is someone on our internal team that is following up on the issue and making sure it has traction. :) |
I think users would appreciate being able to see the progress of a long-running task just by taking a quick glance at the taskbar. |
@lonitra - If you could use any assistance with this issue, please let me know and I would be happy to help. |
TaskbarProgress_StateFlags.mp4 |
In Git Extensions we've been using WindowsAPICodePack for that. My main concern with the original proposal that the API shape wasn't quote aligned with the Windows Forms API. And in my opinion, it'd be wrong to consider just this API in isolation without considering how the rest of the TaskBar API will fit. That is, if this API was implemented as proposed, and later we decide to add more of the TaskBar API to Windows Forms SDK, how well would those synergise? |
Agreed. Ideally there would only need to be one round of design needed to add support for this API. I feel very inclined to support this Taskbar API, especially since it already has first-class support in WPF. |
I see there is also support for adding buttons to the thumbnail toolbar which could leverage the ICommand interface, similar to the new command binding API, to get or set the command to invoke when the thumbnail button is clicked. |
Here is a demo using the taskbar thumbnail toolbar buttons themselves to exercise the ITaskbarList interface methods. TaskbarFun.mp4 |
I'm currently migrating some of the stuff that was handled by the WindowsAPICodePack to use WinForms APIs (like the new TaskDialog and the new FolderBrowserDialog). As described in #181, individual issues should be opened for feature requests.
The WindowsAPICodePack had this API to set the progress of the window in the task bar:
It also supported different states like
Indeterminate
:The result looks like in this article:
Will this feature affect UI controls? Yes
Keywords:
The text was updated successfully, but these errors were encountered: