Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created July 17, 2015 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/fee78240e10c95668db9 to your computer and use it in GitHub Desktop.
Save bjoerntx/fee78240e10c95668db9 to your computer and use it in GitHub Desktop.
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