Advanced programming


Integration via XAML namespace

In addition to the iPlus standard controls, you can use any WPF controls from different manufacturers (e. g. from Telerik, syncfusion, devexpress) for the user interface

You will need some basic knowledge, which you can acquire on the Microsoft website https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/xaml-namespaces-and-namespace-mapping-for-wpf-xaml.

However, you only have to observe the following steps:

  1. Your control library must be located in the program directory of the iPlus installation.
  2. You create a new design in Variobatch Studio or change an existing one.
  3. In the first XML element of the XAML file, you must specify the namespace to which the control you want to use belongs.
  4. Use the control in the XAML code by setting the prefix with a colon in front of the control class name.

Example:

 

In order for an XAML file to be parsed, the first two Microsoft namespaces must be announced:

  1. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

If you want to use controls from the iPlus standard control library (gip.core.layoutengine) specify the namespace xmlns:vb="http://www.iplus-framework.com/ACFramework/xaml".

Control elements for the process technology are included in the gip.core.visualcontrols and are announced with xmlns:vbv="http://www.iplus-framework.com/ACFramework/visual/xaml".

In order to be able to display curve diagrams we recommend you to use the gip.core.scichart.dll (xmlns:vbs="http://www.iplus-framework.com/ACFramework/scichart/xaml" ) which extends the section Abt.Controls.SciChart.Wpf.dll (xmlns:s="http://schemas.abtsoftware.co.uk/scichart").

Which prefixes you use for the namespace mapping is up to you and can be freely assigned. However, we recomend that you use the suggested ones.

 


Using libraries that have not defined an XAML namespace.

Usually, WPF libraries are provided with an xmlnsdefinitionattribute attribute to enable a mapping of XAML namespace to the CLR namespace, and the XAML parser can find and instantiate the controls. If such a definition is missing, the CLR namespace must be specified directly using the following syntax:

xmlns:custom="clr-namespace:SDKSample;assembly=SDKSampleLibrary"

In the clr-namespace attribute, specify the .NET-namespace.

The Full-Qualified-Assembly-Name must be specified in the attribute assembly.