How to change Preview Image on the Vista TaskBar? - wpf

We have a window like this:
WPF main window (with glass border)
-> Child window - frame control
-> Page
When user minimize the main window, and to view the preview image on Vista taskbar,
the preview image will display main window only, the child window (with that page) is missing.
So, my question is how to fix this issue?
Should I change the preview Image?
If yes, how?

Related

WPF Notification Balloon using a User Control

I am working in a WPF app in C# and it is really very very sad that WPF doesn't have a NotifyIcon like in the Win forms has. I have seen a lot of articles in the net for a wpf notifyicon balloon notification project. But none satisfied me. See, I have an idea but i don't know how to execute it.
Create a wpf user control with height and width same like the notifyicon.
Put a border control in it with corner radius 5. Put a grid inside that border control to place the textblocks and images.
Then position that user control to the system tray area. When we click a button from a window, this user control shows up just above the system tray and it hides when we click on outside area.
Is this possible to place the user control [this new "notifyicon" ] just above the system tray area ???
You can do this using an AdornerDecorater in you XAML.
Check this project out GitHub. It has a configurable notification toast popup control for WPF with a demo app.

Silverlight OOB Splash Screen

In my Silverlight 5 OOB main method I'm setting a custom Application.Current.MainWindow.Left and Application.Current.MainWindow.Top.
When starting the application the OOB window appears briefly at the default position which is set in the OutOfBrowserSettings.xml. How can I prevent this? I want something like a custom splash screen for OOB.
You could try starting it full screen to show the splash screen, then resize it to your desired settings.

WPF Window with Control in Full Screen Mode

I have a WPF window hosting a web browser control. I want this WPF window to always be on top. Now for example user surfs to a Youtube page and the web player plays a video. User clicks on the full screen button in the Youtube player and the video fills the screen. But my WPF window that hosts web browser control now is still on top of everything and it looks weird because in the background, the video plays fullscreen.
Is there any way an embedded control can tell WPF window that it's in fullscreen mode now so that the WPF is no longer on top, say maybe hidden?
Thanks for any advice!
Try to play with Topmost property. If you display content not in Popup than this should works:
window.Topmost = false;

Ensure WPF Taskbar Window Preview is actualized

How can I ensure that the hower preview of my WPF application (.net 4) is refreshed when the user places the mouse over the taskbar icon.
I have an app that visualizes some status values. If the app window is minimized and the user hovers over the taskbar button, the preview window that is shown shows the last view of the window at which the window was active. However I would like to have an actualized view.
Is there a possiblity to achieve that?
I believe you'd need to customize the preview, as described here (under the Customizing Preview section). Which leverages the Windows API Code Pack for Microsoft® .NET Framework.
An example can be found here, but looks like:
TabbedThumbnail preview = new TabbedThumbnail(parentForm.Handle, childForm.Handle);
TaskbarManager.Instance.TabbedThumbnail.AddThumbnailPreview(preview);
preview.TabbedThumbnailBitmapRequested += (o, e) =>
{
Bitmap bmp = new Bitmap(width, height);
// draw custom bitmap...
e.SetImage(bmp);
e.Handled = true;
};
Another example, can be found here which states:
The CustomWindowsManager class
provides an abstraction of a
customized window thumbnail preview
and live preview (peek), including the
facilities to receive a notification
when a preview bitmap is requested by
the Desktop Window Manager (DWM) and
to automatically grab the preview
bitmap of a window.
The download link for this code is here, which includes the CustomWindowsManager class. This appears to provide the live preview.
You probably can't. Windows 7 pipes the graphics of an open window to the live preview from the Taskbar. It can't know what the window now looks like while it is minimized because it isn't being drawn at all.
I guess it's not impossible to do custom thumbnails. Aside from CodeNaked's answer, I also found this article, which even includes multiple thumbnails from the same app.

Background HTML visibiltiy in Silverlight Full Screen Mode

I am creating a page with Silverlight component and some HTML controls.
On enabling Silverlight's full screen, I am unable to view the background HTML controls. Even if I set the xaml's background to transparent.
Please let me know if it's possible to view the HTML controls in full screen mode of Silverlight or not.
Thanks
I doubt that such thing is possible, for security reasons, as the keybordsupport in Fullscreen is. It would enable you create such things as a app totally visible observing the movements.
But I might be wrong !
Fullscreen mode takes the content currently restricted to rectangle on hosts window (the Browser client area window) and displays it on full screen window. This full screen window is a new window and contains only the Siverlight content.
When silverlight is rendering in a windowless mode it is simply rendering directly on to the host window. When you got fullscreen mode in Silverlight you are not affecting the hosts window, fullscreen effectively suppends windowless mode as it needs a new window of its own to render on.

Resources