Previously we set a custom thumbnail for the application. In this article we will continue to develop in the thumbnail and add a Toolbar to it. When using Windows Media Player (WMP), the thumbnail toolbar appears when you place the mouse over the WMP icon, including the three function keys "Play", "Next" and "Previous", even if WMP Not the current active window. We can also select songs through this toolbar. Let's create a toolbar with the ability to switch pictures.
ThumbnailButton.ThumbnailToolbarButton Method
Create four function buttons via the ThumbnailToolbarButton(Icon icon, string tooltip) method before creating the toolbar: "Next Image", " Previous Image", "Last Image", "First Image" and add their own Click events (for example, buttonFirst_Click) to complete the image switching function, and then put these buttons into the toolbar.
ThumbnailToolbarButton buttonFirst = new ThumbnailToolbarButton(
Win7TaskbarDemo.PropertIEs.Resources.First, "First Image");
buttonFirst.Enabled = true;
buttonFirst.Click += buttonFirst_Click;
ThumbnailToolbarButton buttonPrevious = new ThumbnailToolbarButton(
Win7TaskbarDemo.PropertIEs.Resources.Previous, "Previous Image");
buttonPrevious.Enabled = true;
buttonPrevious.Click += buttonPrevious_Click;
< BR> ThumbnailToolbarButton buttonNext = new ThumbnailToolbarButton (
Win7TaskbarDemo.PropertIEs.Resources.Next, "Next Image");
buttonPrevious.Enabled = true;
buttonNext.Click + = buttonNext_Click;
ThumbnailToolbarButton buttonLast = new ThumbnailToolbarButton(
Win7TaskbarDemo.PropertIEs.Resource s.Last, "Last Image");
buttonPrevious.Enabled = true;
buttonLast.Click += buttonLast_Click;
ThumbnailToolbarManager.AddButtons Method
AddButtons Method Reference: Br>
public void AddButtons(IntPtr windowHandle, params ThumbnailToolbarButton[] buttons);
public void AddButtons(UIElement control, params ThumbnailToolbarButton[] buttons);
Place four buttons in the toolbar Note the order of the buttons:
TaskbarManager.Instance.ThumbnailToolbars.AddButtons(
new WindowInteropHelper(Application.Current.MainWindow).Handle,
buttonFirst, buttonPrevious, buttonNext, buttonLast); Br>
Effects Demo
As shown in the following figure, the function of the application itself is: "After selecting the picture in the ListBox, the enlarged picture above the ListBox is updated synchronously. If you place the mouse over the taskbar icon, you can see the thumbnail toolbar we just created. You can switch the image in the ListBox with the four function buttons inside to achieve the same function as the program.
Windows 7 not only provides a transformable Win7 desktop and beautiful Win7 theme, but also supports
I dont know if you noticed it. Win7 Ultimate includes a Mobile Center feature, which is desi
When we were using Windows 7, sometimes, due to operational reasons, some of the running icons in th
Do you remember Rafael Rivera? It was his first disclosure of details about Windows 7 new features:
Improve Win 7 startup and shutdown time on netbook
The audio service is not running how do solution Windows7 audio service is not running?
How to do high computer memory usage Win7 memory high solution
Play Windows 7 folder management function
What should I do if there is no sound in the headphones or speakers of the Windows 7 computer?
What is the reason why the shutdown becomes slow?
Two steps to set up win7 rest shortcuts
Windows 7 saves log files in Xml format (2)
Windows 7 system is not bundled with free anti-virus tools?
Let the Win 7 notification bar redisplay the power button
The utility of the system recovery function of win7 system The system recovery function of
What kind of mobile phone SIM card does OPPO R7s use
Win10 was deleted by mistake the recycle bin icon how to find back
Win8.1 also provides scheduled Win10 prompts for
Test: Win8 boot speed is only half of Win7?
Msvcr100.dll lost solution in Win7 system computer (two methods)
How does Win7 turn off the HIPS tool? How to close the HIPS tool in Win7
Windows Firewall can't open solution
How to enter wins bio10 win10 into bios method introduction
Several tips for strengthening the security of Linux systems