Report post

Are you sure you want to report the post shown below? This will send an email to the ATVO administrators. Please include a short reason for reporting.

Users reporting for no reason may be locked out.


Post

Posted by Nick Thissen
on
This is pretty simple to achieve with OverrideBackground property. There are basically two options. I assume you use your schedule spreadsheet as the Data Set for the Widget.

Bind the OverrideBackground of the SubWidget that you use as a ticker template to the "Current" column of the spreadsheet. Then use the following script as converter to convert the "YES" case to a color, and any other case to a transparent color (or whatever color you want):
using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using System.Windows.Media;

namespace Scripts
{
public class ScheduleBackground : IScript
{
private Color CurrentColor = (Color) ColorConverter.ConvertFromString("#434343FF");
private Color NotCurrentColor = Colors.Transparent;

public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
if (value != null)
{
if (value.ToString() == "YES")
return CurrentColor;
}
return NotCurrentColor;
}
}
}