Skip to content
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

Simplify setting dialog icon from bitmaps #15

Merged

Conversation

RussKie
Copy link

@RussKie RussKie commented Mar 24, 2020

Typically images are used from Resources, and those are of Bitmap type.
The existing API only takes Icon that requires additional work from a developer, which wouldn't be straight forward for a significant part of the development community, e.g.:

new TaskDialogIcon(Icon.FromHandle(Properties.Resources.Network.GetHicon()))

Provide an overload that takes a Bitmpa and handles the necessary plumbing.

@RussKie RussKie force-pushed the Simplify_set_icon_from_bitmap branch from 37a759d to 2e8fbe9 Compare March 26, 2020 03:22
Typically images are used from Resources, and those are of `Bitmap` type.
The existing API only takes `Icon` that requires additional work from a
developer, which wouldn't be straight forward for a significant part of
the development community, e.g.:

    new TaskDialogIcon(Icon.FromHandle(Properties.Resources.Network.GetHicon()))

Provide an overload that takes a `Bitmpa` and handles the necessary plumbing.
@RussKie RussKie force-pushed the Simplify_set_icon_from_bitmap branch from 705d861 to 94ca1a3 Compare April 3, 2020 02:03
@RussKie
Copy link
Author

RussKie commented Apr 3, 2020

Updated

@kpreisser
Copy link
Owner

Thanks a lot!

@kpreisser kpreisser merged commit 245651f into kpreisser:taskdialog Apr 8, 2020
@RussKie
Copy link
Author

RussKie commented Apr 14, 2020

Looks like we'll need to implement IDisposable on TaskDialogPage et al after all :)
TIL that to make the TaskDialog design-able we'll need to implement IComponent to show in the designer. This is obviously not something we'll need to action immediately, just sharing the learning.

@RussKie RussKie deleted the Simplify_set_icon_from_bitmap branch April 14, 2020 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants