ToolBar and Button, ToggleButton, ComboBox and Separator : ToolBar « Windows Presentation Foundation « C# / CSharp Tutorial






<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  Title="About WPF" SizeToContent="WidthAndHeight"
  Background="OrangeRed">
  
<Canvas>
  <ToolBar>
    <Button>
      <Image Source="c:\image.gif"/>
    </Button>
    <Separator/>
    <ToggleButton>
      <Image Source="c:\image.gif"/>
    </ToggleButton>
    <ToggleButton>
      <Image Source="c:\image.gif"/>
    </ToggleButton>
    <ToggleButton>
      <Image Source="c:\image.gif"/>
    </ToggleButton>
    <Separator/>
    <ToggleButton>
      <Image Source="c:\image.gif"/>
    </ToggleButton>
    <ToggleButton>
      <Image Source="c:\image.gif"/>
    </ToggleButton>
    <ToggleButton>
      <Image Source="c:\image.gif"/>
    </ToggleButton>
    <Separator/>
    <Label>Zoom</Label>
    <ComboBox SelectedIndex="0">
      <ComboBoxItem>100%</ComboBoxItem>
      <ComboBoxItem>75%</ComboBoxItem>
      <ComboBoxItem>50%</ComboBoxItem>
      <ComboBoxItem>25%</ComboBoxItem>
    </ComboBox>
    <Separator/>
    <Button>
      <Image Source="c:\image.gif"/>
    </Button>
    <Button>
      <Image Source="c:\image.gif"/>
    </Button>
  </ToolBar>
</Canvas>
</Window>
WPF Tool Bar And Button Toggle Button Combo Box And Separator








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