Open weltkante opened 3 years ago
This issue is now marked as "help wanted", and we’re looking for a community volunteer to work on this issue. If we receive no interest in 180 days, we will close the issue. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
Is your feature request related to a problem? Please describe.
ListView.BackgroundImage
is stored into a temporary file when transferred to the native control. This puts pressure on the temp file namespace and produces additional IO, as well as requiring complex code to manage lifetime of the file and delete it when no longer needed.Noted in PR #5744 while simplifying the temp file generation.
Describe the solution you'd like and alternatives you've considered
ListView
supports selecting aHBITMAP
as background image, so it would make sense to make use of that functionality.While the
BackgroundImage
is an arbitraryImage
the old code (before PR #5744) always constructed aBitmap
from it in order to generate a temp file seed. This means if we'll create a Bitmap from the Image to form a HBITMAP we do not introduce additional restrictions that didn't exist before.Also the
BackgroundImage
always was saved inBMP
format, meaning transparency probably never worked (transparent pixels turned out black in my tests). Note that generating aHBITMAP
naively in .NET fills transparent pixels with a background color. We should investigate whetherListView
is capable of rendering transparent backgrounds properly (there exist flags which seam to indiciate support).Will this feature affect UI controls?
Yes,
ListView
will change how it implementsBackgroundImage
and needs attention to not introduce regressions.No designer or API changes are required.