I would like to know if it is possible to "screenshot" an element without showing it on screen.
For example, this StackPanel
:
private void Button_Click(object sender, RoutedEventArgs e)
{
StackPanel sp = new StackPanel();
sp.Children.Add(new Button { Content = "Bouton 1" });
sp.Children.Add(new Button { Content = "Bouton 2" });
sp.Children.Add(new Button { Content = "Bouton 3" });
sp.Children.Add(new Button { Content = "Bouton 4" });
sp.Children.Add(new Button { Content = "Bouton 5" });
// Take screenshot of sp
}
I don't think this is possible, as there is no rendered size, but I'd like to be sure.
Thanks !