[Mono-bugs] [Bug 457597] ImageLayout. Stretch for background image not acting like dot net for PictureBox.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Dec 12 11:06:48 EST 2008


User mattias at flowertwig.org added comment

Mattias Flowertwig <mattias at flowertwig.org> changed:

           What    |Removed                                         |Added
                 CC|                                                |mattias at flowertwig.org

--- Comment #2 from Mattias Flowertwig <mattias at flowertwig.org>  2008-12-12 09:06:48 MST ---
Sorry. I will do a new try :)
The below code should do just fine.
What i can see is that it happens for gif images but not jpg images.

using System.Windows.Forms;
using System.Drawing;

namespace MonoGraphicTestCase
    public class TestForm : Form
        public TestForm()
            PictureBox pb = new PictureBox();
            pb.BackgroundImage = new Bitmap(@"Path to a .gif image here.");
            pb.BackgroundImageLayout = ImageLayout.Stretch;
            pb.Dock = DockStyle.Fill;

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list