Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Visual-Studio TabControl , +
Hello!
 
First of all sorry for my bad english. I am writting a simple application to image proccessing. I would like to open more then one images in window (similary to web browser). I have read sth about it but I only found an option where I can put images like icons into the switching tab area. Please give me a tip how to resolve it. I suppose I need to operate on openfiledialog, maybe dynamically creating a picture box in some loops. Please help.
Posted 14-Jan-13 4:46am
bulibrb321

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I finally see that PictureBox is evil. It's harmless, trivial and very rarely useful, but it has a magic effect on the beginners, tho try to use it where it makes no sense at all. I though WPF users will forget it.
 
OK, there is not PictureBox in WPF; and it is not really needed even in Forms. Just forget it. You have everything to work with images.
 
Everything is derived from here:
http://msdn.microsoft.com/en-us/library/system.windows.media.imagesource.aspx[^].
 
More specifically, everything related to bitmaps — from here:
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapsource.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapsource.aspx#inheritanceContinued[^].
 
That's all you need.
 
—SA
  Permalink  
Comments
bulibrb at 14-Jan-13 12:17pm
   
Thx for the reply, but the point of my problem is how to implement a function which should open different pictures in different tabs from "tabcontrol".
Sergey Alexandrovich Kryukov at 14-Jan-13 13:52pm
   
There is no such concept as "open a picture". If you want to draw a picture, just draw it in different Items of TabControl.Items. They are not exactly tabs, they represent the "tab pages" under each tab. Or, do you need to draw an image on the tab (top area of the control, not the main area)?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 319
1 Kornfeld Eliyahu Peter 265
2 Maciej Los 249
3 BillWoodruff 205
4 Sergey Alexandrovich Kryukov 175
0 OriginalGriff 5,107
1 DamithSL 4,157
2 Maciej Los 3,595
3 Kornfeld Eliyahu Peter 3,450
4 Sergey Alexandrovich Kryukov 2,741


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 14 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100