We have a property, Pan, that is on the root designer and associated with the root component using PreFilterProperties. We created this property so users could view Pan in the property grid, and modify it. But we do not want to serialize this property, or have it create a designer transaction when changed :( (we don't want it in the undo/redo stack). Is such a thing possible? Here are
some of the attributes we put on it:

[DesignOnly(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]

And our prefilterproperties function:

protected override void PreFilterProperties(IDictionary properties) 
{
  base.PreFilterProperties(properties);
  Type type = typeof(PictureDesigner);
  PropertyDescriptorCollection designerProperties =
    TypeDescriptor.GetProperties(type);
  Attribute[] empty = new Attribute[0];
  string[] names = {"SerializeNames", "BackColor", "GridVisible", 
    "GridColor", "GridSpacing", "MinorLineCount", "Zoom", "Pan"};
  foreach (string name in names)
    properties[name] = TypeDescriptor.CreateProperty(type,
      designerProperties[name], empty);
}

Seems pretty simple. There is no serialization in the resx file. But the transaction still forms when we modify the property. Must all properties in the grid create transactions this way? Or is it a limitation with design-time properties?

If we do not put it in the property grid I am not sure how the user can see or modify it using explicit numbers. We have scrollbars for panning but we would like the user to be able to see and modify the numbers as well. Does VS have no convention for this? A transaction for every pan or zoom is not user-friendly.

Thanks,
Frank Hileman
Prodige Software Corporation