A full graph is a command class function that does not need to interact with a map. To implement a custom function, you only need to override the onclick event. In the built-in class, only the controlsmapfullextentcommand command class is available. Haha, this function can be solved in a few words. Let's look at the code.
Code
Public mapfullextent ()
{
String [] res = GetType (). Assembly. getmanifestresourcenames ();
Base. m_bitmap = new system. Drawing. Bitmap (GetType (). Assembly. getmanifestresourcestream ("commands.fullextent.bmp "));
Base. m_caption = "Full graph ";
Base. m_category = "toolbar ";
Base. m_message = "Full graph ";
Base. m_name = "toolbar_mappan ";
Base. m_tooltip = "Full graph ";
}
Public override void oncreate (Object hook)
{
Try
{
M_hookhelper.hook = hook;
M_pactiveview = m_hookhelper.activeview as iactiveview;
}
Catch {m_pactiveview = NULL ;}
}
Public override void onclick ()
{
If (null = m_pactiveview) return;
M_pactiveview.extent = m_pactiveview.fullextent;
M_pactiveview.partialrefresh (esriviewdrawphase. esriviewgeography, null, null );
}
It's quite simple, haha.