I haven't written a post on my blog on disabling both the minimize and maximize button on a WPF window through attached properties in XAML-markup. In the future I will implement disabling the icon as well. For disabling the close button, I see no need for this and believe this to be bad design; therefore it will be unlikely that I will ever implement this functionality unless specifically requested.
I have a WPF image viewing program that I thought for sure was automatically using ICC color profiles imbedded in bitmap images. I thought this for two reasons: (1) I never found any properties in classes like Image, JpegBitmapDecoder, or TiffBitmapDecoder that let you specify whether color profiles are used, so I thought it just did it by default; (2) None of my beta testers ever complained. In fact I had one raving about the high quality of image rendering my app had on his high gamut monitor, and I also have a high gamut monitor where the images just knock your socks off. But I now suspect that the colors look accurate only because the images use the sRGB color space.
In a previous app using GDI+, I had to explicitly tell GDI+ to use ICC color profiles by passing true for the icm parameter of various Bitmap constructor overloads, and it was obvious that this was working, because when I used Adobe RGB for my TIFF files and sRGB for my JPEG files and I A/B'd them, there was no perceptable color difference. If they were not used, the TIFF files would appear washed out because sRGB is used by default if you don't explicitly tell GDI+ to use ICC color profiles. They appear washed out because Adobe RGB has a wider color gamut than sRGB.
But when I specifically A/B'd the same under my WPF application, I was appalled to see that the ICC color profiles built into the images were not being used! My sRGB images looked great and my Adobe RGB imaes looked washed out, whereas in Photoshop they looked the same. Now WPF is touted to be an outstanding replacement for GDI+ applications that Windows Forms and C++/MFC applications were forced to use.
What is really surprising is that the BitmapFrame class (the class I use to display images) has a ColorContexts property that has the ICC color profiles! So why wouldn't it be using them??? This is a read-only property and there doesn't seem to be any other property that would tap the BitmapFrame class on the shoulder and say, "Hey, use your ColorContexts property to display the bitmap, dummy."
Since it has the ICC color profiles right there in front of it, I find it impossible to believe that WPF does not have a way of telling its visual layer to use them. If it doesn't, this would be an application killer of a defect and I'm just sunk: nine months of development down the drain! Please tell me I'm just blind and have somehow missed the property that I must set to get WPF to use ICC color profiles! What is it that I have to do?
I'm not sure how your suggestion applies. I'm taking image files straight out of Photoshop that already have ICC profiles imbedded in them, getting a BitmapFrame from them (through static member, BitmapFrame.Create()) and actually displaying the image though a statement like the following:
image.Source = BitmapFrame;
where "image" is an instance of the Image class and is imbedded in a Grid.
I have told my camera to use the Adobe RGB profile and Photoshop finds that profile in the TIFF files that I save. Then in a separate step, I tell Photoshop to convert the profile to sRGB, and save the result as a JPEG. Re-reading the files into Photoshop shows that the TIFF files do indeed have Adobe RGB and the JPEG files do indeed have sRGB, and they look virtually the same in Photoshop. But when I use the above technique for reading and displaying the TIFF and RGB files in my application, the TIFF files lose saturation, a typical result from ignoring the imbedded profile and applying sRGB by default, as many WEB applications do.
I'm just starting out using WPF and I'm wanting to make a small application to help our sales staff for the end of day paperwork.
What I want to do it have a GUI that the users will type information into and then run some automatic calculations which I'm pretty sure I can do. But when the information in all entered and correct I want them to click SAVE and this will output all the information that they enetered into a sheet and store in a container of some sort.
For example, it's the the of day, I enter in all the days sales etc, calculations have run I click on save, the stuff just entered I want exported and automatically save to a PDF, or HTML file or something.
What would I need to look into so when I click the save button the action is done?
The most obvious way to do this is to make a class that contains all of the data on a form, and use serialisation to store it. Or you can write your own code to store in XML. To get a PDF, you need to buy a library. You can write HTML if you want to. I'd write XML and write an XSLT to show it as HTML.
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Want to get started writing applications on Silveright[^]?
MSDEV brings you a series of training videos on Silverlight 3 at Microsoft Silverlight 3 Series[^]. This series of on demand web seminars will walk through the technology fundamentals, data, graphics, and .NET RIA Services of Silverlight 3.