Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
128
Adding a watermark to the WinGrid
posted

Can someone please advise how to add a watermark to the WinGrid.  I want it to appear in the lower righthand corner of the grid at all time.  I see the background property - but I do not know how to align it to the lower right.  Is there a property or method I am missing?

regards,
Dave

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Dave,

        You can't actually do this with n Appearance setting - or at least not easily. The obvious thing to do would be to use this.ultraGrid1.DisplayLayout.Appearance.ImageBackground. There is also an ImageBackgroundAlignment, but none of the settings here will allow you to align the image to the bottom right. 

        The Image property on the Appearance looks promising and you can use ImageVAlign and ImageHAlign to align an image to the bottom right. But it won't work either, because the Image will be picked up by sub-objects like the grid cells.

        So there's two ways you can do this:

        1) You could use ImageBackground and dynamically change the image inside the grid's Resize event. You would need to create an image that is the same size as the grid and just put the watermark in the lower right corner of the image. This means you also must dispose of the old image every time you create a new one. This approach will work, but it's probably not very efficient.

        2) Use a DrawFilter to draw the image yourself.  If you want to go this route, I recommend checking the Infragistics knowledge base for articles on DrawFilters. Also, get the UIElementViewer utility here: Introducing the Infragistics UIElementViewer Utility

        If you have any trouble with the DrawFilter approach, please let me know. :) 

Children
No Data