Basic Toolbar : ToolBar « Windows Presentation Foundation « C# / CSharp Tutorial






<Window x:Class="MenusAndToolbars.BasicToolbar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="BasicToolbar" Height="300" Width="400">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"></RowDefinition>
      </Grid.RowDefinitions>
      <ToolBar>
        <Separator></Separator>
        <Button>Open</Button>
        <Button>Save</Button>
        <Button>Close</Button>
        <Separator></Separator>
        <CheckBox FontWeight="Bold">Bold</CheckBox>
        <CheckBox FontStyle="Italic">Italic</CheckBox>
        <CheckBox>
          <TextBlock TextDecorations="Underline">Underline</TextBlock>
        </CheckBox>
        <Separator></Separator>        
        <ComboBox SelectedIndex="0">
          <ComboBoxItem>100%</ComboBoxItem>
          <ComboBoxItem>50%</ComboBoxItem>
          <ComboBoxItem>25%</ComboBoxItem>
        </ComboBox>
      </ToolBar>
    </Grid>
  
</Window>
WPF Basic Toolbar








24.49.ToolBar
24.49.1.ToolBar.ButtonStyleKeyToolBar.ButtonStyleKey
24.49.2.Compare the appearances of these controls with the ones in the ToolBar.Compare the appearances of these controls with the ones in the ToolBar.
24.49.3.Toolbar TraysToolbar Trays
24.49.4.Basic ToolbarBasic Toolbar
24.49.5.ToolBarTrayToolBarTray
24.49.6.ToolBar in a ToolBarTrayToolBar in a ToolBarTray
24.49.7.ToolBar button with Customized paintingToolBar button with Customized painting
24.49.8.ToolBarTray and ToolBarToolBarTray and ToolBar
24.49.9.Display a ToolbarDisplay a Toolbar
24.49.10.ToolBar and Button, ToggleButton, ComboBox and SeparatorToolBar and Button, ToggleButton, ComboBox and Separator
24.49.11.Create ToolBar and set header value