Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Crazy PrintPreviewDialog not in intellisense
 

Crazy PrintPreviewDialog not in intellisense

Hello,

My intellisense doesn't seem to be picking up on the methods or properties unique to a PrintPreviewDialog. For example,
"ppd.MinimizeBox = True" works however the "MinimiseBox" doesn't show up in my intellisense - this is strange because every other component shows it's properties & methods.

Regards,

Luc Pettett

Luc Pettett  Friday, September 29, 2006 6:22 AM

When creating a property on a class you could hide it from the designer (Browsable(false), from the serializer (DesignerSerializationVisibility.Hidden) and even, YES, from the IDE (EditorBrowsable(Never)).

Specifically - this is how the MinimeBox property looks like "for real" (via Reflector).

[DefaultValue(false), EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
public bool MinimizeBox
{
      get
      {
            return base.MinimizeBox;
      }
      set
      {
            base.MinimizeBox = value;
      }
}

Ariel Raunstien  Sunday, October 08, 2006 7:41 PM

Ariel,

Thank-you for your reply - The PrintPreviewDialog is an object provided by System.Windows.Form so I cannot modify the properties. Maybe Microsoft has specified the property 'MinimizeBox' as EditorBrowsable(EditorBrowsableState.Never), ??

Has this problem occured for others?

Regards,

Luc Pettett

Luc Pettett  Monday, October 09, 2006 12:59 AM

That's exactly right: the code above is the actual implementation of the "MinimizeBox" property on that PrintPreviewDialog.

If you're not familiar with the Reflector or other disassemblers - these are the kind of tools which let you read any un-obfuscated assemblies as plain code.

Ariel Raunstien  Monday, October 09, 2006 5:59 AM

You can use google to search for other answers

Custom Search

More Threads

• TextBox selection issue
• Overriding the default Windows Forms IRootDesigner
• changing form and controls design
• Mouse and other Events using IDesignerHost
• Collection Property
• Adding controls to a GroupBox hosted inside a UserControl
• How to set custom image in DefaultValueAttribute?
• What's Wrong? I lost the changing in editing form and any changing had not been saved.
• How to set a font for ToolTip
• Windows Forms Layout using XML file