Xpand.ExpressApp.Win.Para.WindowsIntegration
Deeper Windows Integration Features to XAF/Xpand
Install / Use
/learn @biohazard999/Xpand.ExpressApp.Win.Para.WindowsIntegrationREADME
Xpand.ExpressApp.Win.Para.WindowsIntegration
Deeper Windows Integration Features to XAF/Xpand
The WindowsIntegrationWindowsFormsModule
This Module allows you to integrate the TaskbarAssistent into XAF.
Installation
Simple grab via nuget or download the source and rebuild it. If you build it from scratch you need to specify a key for strong naming.
Install-Package Xpand.ExpressApp.Win.Para.WindowsIntegration
Getting started
Integrate the WindowsIntegrationWindowsFormsModule like you would do with any Module.
This is a WindowsForms only Module.
Rebuild your project and you will see 2 additional nodes in the Options section:

The TaskbarJumpListOptions node allows you to specify JumplistCategories and JumplistItems.
Jumplists
Set the EnableJumplist option to True and specify a argument name that will be used to launch your application with command line arguments.

Note if you only like to launch external applications you can skip the
NavigationItemJumplistArgumentNameTheNavigationItemJumplistArgumentNameshould end with a colon.
You see two nodes:
- The
CustomCategoriesnode: This allows you to specify custom categories withJumpItemsin it. - The
TasksCategoryis the default category provided by windows.

Currently there are 3 types of JumpListItems:
- The
TaskbarJumplistJumpItemLaunchallows you to specify any program that you'd like to launch. You can provide arguments and aWorkingDirectory. - The
TaskbarJumplistJumpItemNavigationItemallows you to specify aNavigationItemthe user can select from the the Jumplist. - The
TaskbarJumplistSeperatorItemis a simple seperator that draws a horizontal line.

TaskbarJumplistJumpItemLaunch

You can currently specify:
PathToLaunch: The program you like to launchArguments: The arguments that are passed to the applicationWorkingDirectory: Specifies the folder in which the program is launchedImageName: An ImageName to provide an icon for the JumpListItemCaption: The Text that is displayed to the userIndex: The order of the JumpListItemId: The Id of the item
TaskbarJumplistJumpItemNavigationItem

You can currently specify:
NavigationItem: Specifies the NavigationItem that should be shownUseProtocolIfAvailable: Uses the protocol handler if availableImageName: An ImageName to provide an icon for the JumpListItemCaption: The Text that is displayed to the userIndex: The order of the JumpListItemId: The Id of the item
TaskbarJumplistSeperatorItem

You can currently specify:
Index: The order of the JumpListItemId: The Id of the item
Custom Categories


You can currently specify:
Caption: The caption of the CategoryIndex: The order of the JumpListItemId: The Id of the item
Adding new items is exact the same as for the TasksCategory.
Bootstrapping code for NavigationItemJumplistItems
static class Program
{
private static WinApplication _Application;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
var assemblyName = typeof(Program).Assembly.GetName();
var mutexName = assemblyName.Name + "_" + assemblyName.Version.ToString(3);
#if DEBUG
mutexName += "_Debug";
#endif
using (var instance = new SingleInstance(mutexName))
{
if (instance.IsFirstInstance)
{
instance.ArgumentsReceived += WindowsIntegrationWindowsFormsModule.InstanceOnArgumentsReceived;
instance.ListenForArgumentsFromSuccessiveInstances();
Specify a mutex name. This is an ordinary string, my experiance has shown that a combination of the assemblyName combined with the version of the application and a debug constant works very well for the most scenarios.
Create an instance of the SingleInstance class that manages our application instances.
Check if this is the first instance launched, attach the ArgumentsReceived event handler to the WindowsIntegrationWindowsFormsModule.InstanceOnArgumentsReceived method and call the ListenForArgumentsFromSuccessiveInstances method to listen for new arguments on the NamedPipe.
Create your application as you always would:
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
_Application = new WinApplication
{
ApplicationName = assemblyName.Name,
SplashScreen = new DevExpress.ExpressApp.Win.Utils.DXSplashScreen()
};
_Application.CreateCustomObjectSpaceProvider += (sender, args) =>
{
args.ObjectSpaceProvider = new XPObjectSpaceProvider(new ConnectionStringDataStoreProvider(args.ConnectionString));
};
_Application.DatabaseVersionMismatch += (sender, args) =>
{
args.Updater.Update();
args.Handled = true;
};
_Application.Modules.Add(new SystemModule());
_Application.Modules.Add(new SystemWindowsFormsModule());
_Application.Modules.Add(new WindowsIntegrationWindowsFormsModule());
_Application.Modules.Add(new DemoCenterModule());
_Application.Modules.Add(new DemoCenterWindowsFormsModule());
Before you start the application make sure you pass the WinApplication instance to the WindowsIntegrationWindowsFormsModule.TaskbarApplication propety:
WindowsIntegrationWindowsFormsModule.TaskbarApplication = _Application;
Than setup and launch your application
InMemoryDataStoreProvider.Register();
_Application.ConnectionString = InMemoryDataStoreProvider.ConnectionString;
try
{
_Application.Setup();
_Application.Start();
}
catch (Exception e)
{
_Application.HandleException(e);
}
If the application is not the first instance pass the arguments to the first instance:
}
else
{
instance.PassArgumentsToFirstInstance();
}
The whole bootstrapper now should look like this:
using System;
using System.Configuration;
using System.Windows.Forms;
using DevExpress.ExpressApp.SystemModule;
using DevExpress.ExpressApp.Win;
using DevExpress.ExpressApp.Win.SystemModule;
using DevExpress.ExpressApp.Xpo;
using Xpand.Demo.Para.DemoCenter.Module.Win;
using Xpand.ExpressApp.Win.Para.WindowsIntegration;
namespace Xpand.Demo.Para.DemoCenter.Win
{
static class Program
{
private static WinApplication _Application;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
var assemblyName = typeof(Program).Assembly.GetName();
var mutexName = assemblyName.Name + "_" + assemblyName.Version.ToString(3);
#if DEBUG
mutexName += "_Debug";
#endif
using (var instance = new SingleInstance(mutexName))
{
if (instance.IsFirstInstance)
{
instance.ArgumentsReceived += WindowsIntegrationWindowsFormsModule.InstanceOnArgumentsReceived;
instance.ListenForArgumentsFromSuccessiveInstances();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
_Application = new WinApplication
{
ApplicationName = assemblyName.Name,
SplashScreen = new DevExpress.ExpressApp.Win.Utils.DXSplashScreen()
};
_Application.CreateCustomObjectSpaceProvider += (sender, args) =>
{
args.ObjectSpaceProvider = new XPObjectSpaceProvider(new ConnectionStringDataStoreProvider(args.ConnectionString));
};
_Application.DatabaseVersionMismatch += (sender, args) =>
{
args.Updater.Update();
args.Handled = true;
};
_Application.Modules.Add(new SystemModule());
_Application.Modules.Add(new SystemWindowsFormsModule());
_Application.Modules.Add(new WindowsIntegrationWindowsFormsModule());
_Application.Modules.Add(new DemoCenterModule());
_Application.Modules.Add(new DemoCenterWindowsFormsModule());
WindowsIntegrationWindowsFormsModule.TaskbarApplication = _Application;
InMemoryDataStoreProvider.Register();
_Application.ConnectionString = InMemoryDataStoreProvider.ConnectionString;
try
{
_Application.Setup();
_Application.Start();
}
catch (Exception e)
{
_Application.HandleException(e);
}
}
else
Related Skills
node-connect
353.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
Languages
Security Score
Audited on Jul 30, 2023
