If I call to update a
private static UIElement Elements()
{
var panel = new Panel();
txt3 = new Text(font, "SV")
{
ForeColor = Colors.White,
HorizontalAlignment = HorizontalAlignment.Right,
};
txt3.SetMargin(50);
panel.Children.Add(txt3);
}
If I call the below code from a button click, it works
private static void Button_Click(object sender, RoutedEventArgs e)
{
…
}
, but If I call from another class it give the below exception
public static void TempSV_Update(String t)
{
Program.DB_Print("Temp SV Update");
txt3_temp = t;
txt3.TextContent = txt3_temp;
txt3.Invalidate();
}
Exception
Call stack