[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


https://bugzilla.novell.com/show_bug.cgi?id=457597

User mattias at flowertwig.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=457597#c2


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;
            this.Controls.Add(pb);
        }
    }
}


-- 
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