Display Images provides:
- Embedded image storage
- Multiple format support
- Dynamic brush creation
- Resource replacement
- Fill pattern usage
- Runtime color dynamics
Once imported, images become part of the solution database, eliminating dependency on external files
Overview
Used to insert an external image file from your computer into the solution configuration, such as an icon, wallpaper, object, or background image. After the image is imported, you no longer need the original file. Images can be used as color brushes for any drawing object, and they can even be used as "color" or in the ColorFill dynamic attributes.
On this page:
Table of Contents maxLevel
2 minLevel 2 indent 10px exclude Steps style none
Supported Formats
Format | Extension | Use Case |
---|---|---|
Bitmap | .bmp | Uncompressed images |
GIF | .gif | Simple animations |
Icon | .ico | Application icons |
JPEG | .jpg | Photographs |
SVG | .svg | Scalable vectors |
PNG | .png | Transparent graphics |
TIFF | .tiff | High-quality images |
WDP | .wdp | HD Photo format |
Importing Images
Import Process
- Navigate to Displays → Images
- Click Import Images
- Select image files
- Click Open
Images are embedded in the project database.
Batch Import
- Select multiple files
- Maintain folder structure
- Auto-generate names
- Preview before import
Using Images
In Display Editor
- Open Displays → Draw
- Select Images category in Components Panel
- Drag image to canvas
- Configure stretch mode
As Object Fill
Apply images as brushes:
- Rectangles
- Ellipses
- Paths
- Backgrounds
- LabelBoxes
Stretch Modes
Mode | Description | Use Case |
---|---|---|
None | Original size | Icons, logos |
Fill | Fill container | Backgrounds |
Uniform | Maintain aspect ratio | Photos |
UniformToFill | Fill and crop | Wallpapers |
Image Properties
Property | Description | Editable |
---|---|---|
Name | Resource identifier | Yes |
Description | Image documentation | Yes |
Folder | Organization path | Yes |
ResourceType | File type | Read-only |
Dimension | Width x Height | Read-only |
Size | File size in bytes | Read-only |
Image Management
Replacing Images
- Keep same resource name
- Import new version
- Auto-updates throughout solution
- No display changes needed
Organizing Images
/Backgrounds
/Screens
/Popups
/Icons
/Navigation
/Equipment
/Logos
/Company
/Products
Dynamic Image Usage
Runtime Image Change
csharp
// Change image source
@Display.MyImage.Source = "NewImageName";
// Toggle between images
if (condition)
@Display.Background.Fill = "Image1";
else
@Display.Background.Fill = "Image2";
Image as Color
csharp
// Use image in color dynamics
@Display.Rectangle1.Fill = "ImageBrush:Logo";
// Conditional image fill
@Display.Shape.Fill = @Tag.State == 1 ?
"ImageBrush:ActiveImage" :
"ImageBrush:InactiveImage";
Best Practices
- Optimize Size - Compress before import
- Use Appropriate Formats - PNG for transparency, JPG for photos
- Organize Folders - Logical structure
- Name Consistently - Clear identifiers
- Document Purpose - Use descriptions
- Consider Resolution - Match display requirements
- Test Scaling - Verify stretch modes
Performance Considerations
Image Optimization
- Limit file sizes
- Use appropriate resolution
- Avoid oversized images
- Consider vector formats
Memory Management
- Images load on demand
- Cached after first use
- Released when not visible
- Monitor total size
Common Applications
Backgrounds
xml
<Page Background="ImageBrush:PlantLayout">
<!-- Display content -->
</Page>
Equipment States
csharp
// Motor image based on state
string motorImage = @Tag.Motor.Running ?
"Motor_Running" : "Motor_Stopped";
@Display.MotorImage.Source = motorImage;
Navigation Icons
xml
<Button>
<Image Source="Icon_Home" Width="32" Height="32"/>
</Button>
Troubleshooting
Image not displaying:
- Verify name spelling
- Check import success
- Review stretch mode
- Test in runtime
Poor quality:
- Use higher resolution
- Try different format
- Check stretch settings
- Avoid excessive scaling
Memory issues:
- Reduce image sizes
- Limit simultaneous images
- Use image compression
- Monitor resource usage
Update not reflecting:
- Maintain same name
- Rebuild solution
- Clear cache
- Restart runtime
Advanced Features
Image Libraries
Create reusable image sets:
csharp
public class ImageLibrary
{
public static string GetStateImage(int state)
{
return state switch
{
0 => "State_Idle",
1 => "State_Running",
2 => "State_Alarm",
_ => "State_Unknown"
};
}
}
Dynamic Loading
csharp
// Load image from database
byte[] imageData = @Dataset.Query.Images.GetImage(id);
@Display.DynamicImage.LoadFromBytes(imageData);
In this section...
Page Tree | ||||
---|---|---|---|---|
|
Working with Display Images
You can import any image file in the Displays / Images. This creates a repository of images for the application that is stored inside the project database file. You do not need the original files anymore. These images can be used to be the Fill of an object, such as rectangles, ellipses, LabelBoxes, paths, page background, or target color in runtime dynamics using colors.
Supported file types include .bmp, .gif, .ico, .jpg, .svg, .png, .tiff, and .wdp.
If you need to update an image with a new version, you can replace it, and it will be updated throughout the application. Be sure to keep the resource name the same.
You can use any image file to fill or "paint" an object when you create displays in Display / Draw.
Importing Image resources
Go to Displays → Images.
Click Import Images.
Navigate to the folder of the images you want to import.
Select the image files and click Open.
Adding image to displays
Go to Displays / Draw.
On the Components Panel, click on the Images Component category.
Select the image and click in the Draw area.
Info |
---|
Typically, you may use UNIFORM or FILL for image stretching. The image (using the Appearance menu to the left) can be applied to any graphical shape in the display. |
Displays Images Table
You apply the images directly in the Draw interface, so it is usually not necessary to visit this table, except for importing new images or managing image resources.
Displays Images Table
Name
Edit the default name.
Description
Enter a description of this image.
Folder
Specify the folder where the resource is
ResourceType
Specify the type of the resource
Dimension
Read-only. Show the dimension of the resource file
Size
Read-only. Show the size of the resource file
In this section:
Page Tree | ||||
---|---|---|---|---|
|