ContentPresenterApp scripting
- Last UpdatedJul 16, 2024
- 2 minute read
The ContentPresenterApp has two scriptable properties: Follow Current Context and Navigation Search Mode. Only one property, Navigation Search Mode is bindable, allowing you to change its value via scripting at run time.
Script statements can be specified using the MyContent Namespace format in layout scripting by the following syntax formats:
MyContent.name of the ContentPresenterApp instance.ContentPresenterApp_Method(parameter_1, parameter_2, parameter_n);
or
MyContent.name of the ContentPresenterApp instance.ContentPresenterApp_Property = xxx
Scripting Methods
The ContentPresenterApp includes the Refresh() scripting method for layout scripts.
Content Presenter OMI App and Layout Scripts
The following table summarizes ContentPresenterApp properties, their data types, and their default values. The scriptable property name Navigation Start Node, when used in a layout script, is entered as a single word without blank spaces.
|
PI Vision App Properties |
Data Type |
Default Value |
Scriptable |
Bindable |
|
Follow Current Context |
Boolean |
True |
No |
YES |
|
Content Type |
Enum |
Any |
No |
No |
|
Name Contains |
String |
* |
No |
No |
|
Search Child Levels |
Enum |
Unconfigured |
No |
No |
|
Navigation Search Options |
Enum |
Unconfigured |
No |
No |
|
Navigation Start Node |
String |
\\Home |
YES |
YES |
|
Sort by Alphabetic Order |
Boolean |
False |
No |
No |
|
Fill |
Enum |
Horizontal |
No |
No |
|
View Mode |
Enum |
ListContent |
No |
No |
|
Vertical Alignment |
Enum |
Top |
No |
No |
|
Horizontal Alignment |
Enum |
Left |
No |
No |
|
Padding |
System.Windows.Thickness |
0,0,0,0 |
No |
No |
|
Size Mode |
Enum |
Scaled |
No |
No |
|
Fixed Width |
Double |
400 |
No |
No |
|
Display Columns |
Integer |
0 |
No |
No |
|
Display Rows |
Integer |
0 |
No |
No |
|
Stretch |
Boolean |
False |
No |
No |
|
Fixed Height |
Double |
300 |
No |
No |
|
Interactive Content |
Boolean |
False |
No |
No |
|
Trigger Navigation |
Boolean |
False |
No |
No |
|
Search Levels |
Enum |
All |
No |
No |
|
Navigation Search Mode |
Enum |
Fixed location |
No |
No |
|
Background |
System.Windows.Media.Brush |
No color |
No |
No |