Hi Dojo Community,
I noticed that Skyline uses StackPanel in some of their IAS.
Since I need the same functionality, I would like to use this or a similar tool for the latest Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit (10.5.4.3).
However, it is not available.
It is only available in Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit.Preview (0.0.0), which was released in 2023.
Is there something similar I can use with Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit?
Hi Felix,
I initially contributed that functionality, but shortly after, I moved to a different department and the project didn’t receive much follow-up attention for a while. Fortunately, it has recently been picked up again, but it still requires some internal testing due to a few breaking changes.
While we can't commit to a release date, you can follow the progress through the GitHub pull request here: https://github.com/SkylineCommunications/Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit/pull/34
In the meantime, you'll need to manually calculate the widget positions on the grid.


While creating the buttons, you could implement the handler as a lambda so you get access to the context for free. Or you add a dictionary that maps the button to the context you need in a handler method:
public class Presenter
{
private readonly View view;
private readonly Model model;
private readonly Engine engine;
private readonly Dictionary<object, Item> itemMap = new Dictionary<object, Item>();
// example 1
public void LoadFromModel_EventHandlerLambda()
{
foreach (Item item in model.items)
{
var button = new Button();
button.Pressed += (o, args) =>
{
engine.GenerateInformation(item.Foo);
model.DoAction(item.Bar);
button.IsEnabled = false;
};
view.ButtonName.Add(button);
}
}
// example 2
public void LoadFromModel_EventHandlerMethod()
{
foreach (Item item in model.items)
{
var button = new Button();
button.Pressed += OnButtonPressed;
itemMap.Add(button, item);
view.ButtonName.Add(button);
}
}
private void OnButtonPressed(object sender, EventArgs args)
{
Item item = itemMap[sender];
engine.GenerateInformation(item.Foo);
model.DoAction(item.Bar);
((Button)sender).IsEnabled = false;
}
}

Thanks Thomas, I'll try this.
Hi Thomas,
great to know it'll come later.
Calculating the position is working fine.
But I've no idea how to implement the EventHandlers for the dynamically created buttons.
Do you have some example available before StackPanel was developed?
I'm using Model/View/Presenter and adding items to the presenter (e.g. List<Button> with view.ButtonName.Add(new Button(), …) in a for loop.
Within the view I use another for loop for AddWidget(ButtonName[i], …) to place the on the grid.