Partager via


Status Bar

The Visual Studio status bar, the horizontal region at the bottom of the Visual Studio design surface, provides a convenient way to convey information about the current state of the integrated development environment (IDE). The status bar comprises four programmable regions, as shown in the following table:

Region

Description

Feedback

Displays text. You can set and retrieve text, display static text, and highlight the displayed text.

Progress Bar

Displays incremental progress for quick operations, such as saving a single file to disk.

Animation

Displays a continuously looped animation, which indicates either a lengthy operation or an operation of indeterminate length (for example, building multiple projects in a solution).

Designer

Displays information pertinent to editing, such as the line number or column number of the cursor location.

The status bar's functionality is available to any client object at any time through the IVsStatusbar interface, which is offered by the SVsStatusbar service. In addition, any object sited on a window frame can register as a status bar client object by implementing the IVsStatusbarUser interface. Whenever a window is activated, Visual Studio queries the object sited on that window for the IVsStatusbarUser interface. If found, Visual Studio calls the SetInfo method on the returned interface, and the object can update the status bar from within that method. Document windows, for example, can use the SetInfo method to update information in the Designer region when they become active.

Example

Description

This example demonstrates how to display highlighted text in the Feedback region.

Code

<StatusBar Name="sbar" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" 
           VerticalAlignment="Bottom" Background="Beige" > 
     <StatusBarItem>
       <TextBlock>Ready</TextBlock>
     </StatusBarItem>
     <StatusBarItem>
       <Separator Style="{StaticResource StatusBarSeparatorStyle}"/>
     </StatusBarItem>
</StatusBar>

In This Section

See Also

Other Resources

User Interfaces