dsafa / CSDeskBand

Windows deskband with C#
MIT License
274 stars 65 forks source link

In WPF mode HwndSource.SizeToContent needs to be set to SizeToContent.Manual without setting Width or Height to make it size to the parent, so that the UIElement assigned stretches to cover the whole Deskband. #46

Open rwasef1830 opened 4 years ago

rwasef1830 commented 4 years ago

Hello, The latest version of this library has a small issue. In WPF mode, if you set a UIElement in the child class of CSDeskbandWpf, it will not stretch to the whole width of the deskband. Instead it will take the minimum width and the deskband will shrink to its size, leaving the rest of the deskband area empty.

To solve this issue, a small patch is needed to the CSDeskBandWpf class constructor. After creating HwndSource using HwndSourceParameters, assign the SizeToContent property on it to SizeToContent.Manual and it will behave the same as previous versions.

dsafa commented 4 years ago

Thanks for the info!