insert image in mdi container

Jan 15, 2011 at 12:04 PM

Hi, i want to add an image in mdi container, regarding this how can i do this. Your quick response will be highly appreacited.

Jan 15, 2011 at 6:01 PM

Hi,
your question isn't clear. I can think of 2 possibilities:

1) You wanna add image as MdiContainer background.
In that case, Background property should work:

MdiContainer mc = new MdiContainer();
mc.Background = new ImageBrush { ImageSource = <image> };

2) You want MdiChild with image.
You can assign Image control to Content property of MDIChild:

MdiContainer container = new MdiContainer();
MdiChild child = new MdiChild();
child.Content = new Image { ImageSource = <image> };
container.Children.Add(child);

 

If that's not what you asked, please provide more details.

Jan 16, 2011 at 10:28 AM
Thanks stbear

On Sat, Jan 15, 2011 at 10:01 PM, stbear <notifications@codeplex.com> wrote:

From: stbear

Hi,
your question isn't clear. I can think of 2 possibilities:

1) You wanna add image as MdiContainer background.
In that case, Background property should work:

MdiContainer mc = new MdiContainer();
mc.Background = new ImageBrush { ImageSource = <image> };

2) You want MdiChild with image.
You can assign Image control to Content property of MDIChild:

MdiContainer container = new MdiContainer();
MdiChild child = new MdiChild();
child.Content = new Image { ImageSource = <image> };
container.Children.Add(child);

If that's not what you asked, please provide more details.

Read the full discussion online.

To add a post to this discussion, reply to this email (wpfmdi@discussions.codeplex.com)

To start a new discussion for this project, email wpfmdi@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com