Click here to Skip to main content
15,884,425 members
Home / Discussions / WPF
   

WPF

 
QuestionRun application on 2nd Core Pin
divyesh143213-Nov-09 0:46
divyesh143213-Nov-09 0:46 
AnswerRe: Run application on 2nd Core Pin
Covean13-Nov-09 1:46
Covean13-Nov-09 1:46 
QuestionI want to learn silver light.Can any one tell me the best approach? Pin
pallaka13-Nov-09 0:42
pallaka13-Nov-09 0:42 
AnswerRe: I want to learn silver light.Can any one tell me the best approach? Pin
Mark Salsbery13-Nov-09 7:59
Mark Salsbery13-Nov-09 7:59 
AnswerRe: I want to learn silver light.Can any one tell me the best approach? Pin
Michael Eber22-Jan-10 12:54
Michael Eber22-Jan-10 12:54 
QuestionHow to create a "Are you sure pop-up when closing application (with never show this message again check box)" using WPF and C#?. Pin
rajeberer12-Nov-09 20:40
rajeberer12-Nov-09 20:40 
AnswerRe: How to create a "Are you sure pop-up when closing application (with never show this message again check box)" using WPF and C#?. Pin
Richard MacCutchan12-Nov-09 22:52
mveRichard MacCutchan12-Nov-09 22:52 
QuestionHelp with a custom layered bitmap control in WPF Pin
BryanWilkins12-Nov-09 14:38
professionalBryanWilkins12-Nov-09 14:38 
Hi,

First of all, i had no intention of this being so long, but i needed to be thourough, so here goes.

I have been a Code Project member for so long that i feel guilty for not contributing more to this wonderful site. I recently have begun converting a Windows Form application that I wrote to WPF. I can safely say that I am really comfortable using Windows Forms because I have been programming using them for years. Before that, MFC windows apps. I'm not afraid of a challenge, and I really believe that in the long run my application will be better for making the transition to WPF. Thus, comes the issue.

My Application is a retail photo editing application that is used exclusively in our stores to sell printed photos to people These photos have been adorned with "Borders" or "Frames" that are bitmap based. Basically, I have a set of "Layers" that comprise my product. The picture, the Bitmap border, and maybe some little adorner decals and a text layer or two. Each layer has a z-order and in my WinForms app is neatly rendered by a custom control that i wrote using old style GDI+ drawimage commands and a-lot of refreshes everytime something changed.

When I say everytime something changed i mean if the user dragged the photo to a new position under the border or changed the zoom, colors, saturation etc the application would have to redraw everything reflecting the changes. Needless to say, that in order to achieve realtime rendering of all these effects, i had to use a scaling factor and cached, smaller bitmaps in order to get these things to happen in realtime. It was a real pain to keep everything straight.

Then comes along WPF and turns everything upside down for me. I now have a new rendering system that natively supports transparency and has pixel shaders for the effects such as saturation and chroma key. I have done some tests with raw bitmaps and all of these effects can be achieved realtime with no problems on todays hardware. Everythings good right?

Wrong. I have converted everything but what i call the main Workspace control. I am soooo stuck on this it isn't funny to me anymore. I have been reading everything i can get my hands on and I guess I am too close to the problem because I am hopelessly stuck trying to decide how to implement this. I have a .xml file that describes how a picture should be placed in a border. meaning the top left and size depending on the orientation and aspect ratio. This is already done from my winforms application, so i have all of the info i need. I would love to make a control that would work in my "Real world" coordinates. Just so you know. My bitmaps are 300 dpi bitmaps so they are large. like 2700x3000. I think i should be able to make some sort of composite control that is like a canvas that holds all of my "Layers" and places them at there respective coordinates and shows all of the content even though it is huge, all in a small control, say 600x600.

I can see 2 ways to do this. Do as i said, and layer image controls in some sort of layout control, but i have no idea how to translate the coordinates or does WPF handle that automagically for me? or create a control and use drawvisuals in order to make the composites. I have been trying to get something to work for days and keep running into walls. I know that this comes from a basic lack of experience in the WPF layout technologies, but i need help. I thought this topic would maybe someday make a good 1st article for me. So what do you think? Any help? Ideas? Good idea for an article?

Thank you for your time,

Bryan Wilkins
AnswerRe: Help with a custom layered bitmap control in WPF[Solved] Pin
BryanWilkins16-Nov-09 2:33
professionalBryanWilkins16-Nov-09 2:33 
Questionlistbox problems Pin
loyal ginger12-Nov-09 9:01
loyal ginger12-Nov-09 9:01 
AnswerRe: listbox problems Pin
Pete O'Hanlon12-Nov-09 9:26
mvePete O'Hanlon12-Nov-09 9:26 
QuestionMessage Removed Pin
12-Nov-09 3:28
professionalN_tro_P12-Nov-09 3:28 
AnswerRe: Silverlight 3 tutorial Pin
Mark Salsbery12-Nov-09 6:54
Mark Salsbery12-Nov-09 6:54 
QuestionDesigner issue Pin
Tauseef A12-Nov-09 3:18
Tauseef A12-Nov-09 3:18 
AnswerRe: Designer issue Pin
Mark Salsbery12-Nov-09 7:00
Mark Salsbery12-Nov-09 7:00 
QuestionRe: Designer issue Pin
Tauseef A12-Nov-09 19:43
Tauseef A12-Nov-09 19:43 
AnswerRe: Designer issue Pin
Mark Salsbery12-Nov-09 21:36
Mark Salsbery12-Nov-09 21:36 
QuestionRe: Designer issue Pin
Tauseef A13-Nov-09 7:04
Tauseef A13-Nov-09 7:04 
AnswerRe: Designer issue Pin
Mark Salsbery13-Nov-09 7:18
Mark Salsbery13-Nov-09 7:18 
QuestionWPF Grid View Pin
sankarganesh11-Nov-09 21:48
sankarganesh11-Nov-09 21:48 
AnswerRe: WPF Grid View Pin
Pete O'Hanlon11-Nov-09 22:32
mvePete O'Hanlon11-Nov-09 22:32 
QuestionSet the Text property of a TextBox Pin
soup11-Nov-09 11:53
soup11-Nov-09 11:53 
AnswerRe: Set the Text property of a TextBox Pin
Christian Graus11-Nov-09 14:08
protectorChristian Graus11-Nov-09 14:08 
GeneralRe: Set the Text property of a TextBox Pin
soup11-Nov-09 22:25
soup11-Nov-09 22:25 
AnswerRe: Set the Text property of a TextBox Pin
Jeremy Hutchinson12-Nov-09 5:03
professionalJeremy Hutchinson12-Nov-09 5:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.