Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created July 17, 2015 16:25
private void RemoveWatermarkImages(TXTextControl.TextControl textControl)
{
// List of images to be deleted
List<TXTextControl.Image> lImagesToRemove =
new List<TXTextControl.Image>();
// loop through all images and check for the Name
foreach (TXTextControl.Image img in textControl1.Images)
{
// add watermark images to the List
if (img.Name == "Watermark")
lImagesToRemove.Add(img);
}
// remove all tagged watermark images
foreach(TXTextControl.Image img in lImagesToRemove)
{
textControl1.Images.Remove(img);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment