Friday, November 10, 2017

JumpList in WPF application



Reference to JumpList in WPF application

https://blog.codeinside.eu/2015/11/30/working-with-jumplists-in-wpf-apps/

https://msdn.microsoft.com/en-us/library/ff770767.aspx

Creating JumpLists via XAML

Small warning: If you try this on Windows Vista, your app will just crash…
JumpLists are registred per application and the easiest way to create a (static) JumpList is via XAML in the App.xaml:
http://schemas.microsoft.com/winfx/2006/xaml/presentation
" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml">

Creating JumpLists via Code

The “coding” JumpList API is a bit odd to use, but still easy to understand:
var jt = new JumpTask
{
    ApplicationPath = "C:\\Windows\\notepad.exe",
    Arguments = "readme.txt",
    Title = "Recent Entry for Notepad",
    CustomCategory = "Dummy"
};

JumpList.AddToRecentCategory(jt);



var jt2 = new JumpTask
{
    ApplicationPath = "C:\\Windows\\notepad.exe",
    Arguments = "readme.txt",
    Title = "Code Entry for Notepad",
    CustomCategory = "Dummy"
};

var currentJumplist = JumpList.GetJumpList(App.Current);
currentJumplist.JumpItems.Add(jt2);
currentJumplist.Apply();
The “Apply()” call is needed, otherwise the new JumpItem will not be added. As you can see, you can create new JumpList entries, add (and I think you could also remove items) from the default recent category. Besides JumpTasks there is JumpPath, which just contains a link.
In the XAML Part I also hooked up some events, so your application can get notified when a user pins something or removes something which you might want to handle.

Wednesday, November 1, 2017



Reference to article
https://justenglish.me/2012/09/01/free-books-100-legal-sites-to-download-literature/