Creating a zoom factor extension that works with a ToolbarControl
Extension\ZoomExtension.cs
// Copyright 2012 ESRI
// 
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
// 
// You may freely redistribute and use this sample code, with or
// without modification, provided you include the original copyright
// notice and use restrictions.
// 
// See the use restrictions.
// 

using ESRI.ArcGIS.esriSystem;

namespace ZoomFactorExtensionCSharp
{
  public sealed class ZoomExtension : IExtension, IExtensionConfig, IZoomExtension
  {
    private double m_zoomFactor;
    private esriExtensionState m_extensionState; 

    public ZoomExtension()
    {

    }

    public void Shutdown()
    {
      //Not implemented
    }
  
    public void Startup(ref object initializationData)
    {
      //Default zoom factor
      m_zoomFactor = 2;
      //Default extension state is disabled
      m_extensionState = esriExtensionState.esriESDisabled;
    }
  
    public string Name
    {
      get
      {
        return "Zoom Factor Extension";
      }
    }
  
    public string Description
    {
      get
      {
        return "Variable ZoomExtension Sample";
      }
    }
  
    public string ProductName
    {
      get
      {
        return "ZoomExtension Sample";
      }
    }
  
    public esriExtensionState State
    {
      get
      {
        return m_extensionState;
      }
      set
      {
        m_extensionState = value;
      }
    }
  
    public double ZoomFactor
    {
      get
      {
        return m_zoomFactor;
      }
      set
      {
        m_zoomFactor = value;
      }
    }
  }
}