Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Transparent toolbar and overflow area

Transparent toolbar and overflow area

Scheduled Pinned Locked Moved WCF and WF
tutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yanairon
    wrote on last edited by
    #1

    Hi everybody, I tried to have a transparent toolbar (Background="Transparent") but the overflow area (this thingy with a button that you can drag the toolbar from - don't know it's technical name :) ) stayed. Does anybody know how to make it be transparent without the need of a new control template which requires me to build everything from scratch? I know i won't have any overflow items and the toolbar is fixed (can't be drag) i will appreciate a clue :) Yanai

    F 1 Reply Last reply
    0
    • Y yanairon

      Hi everybody, I tried to have a transparent toolbar (Background="Transparent") but the overflow area (this thingy with a button that you can drag the toolbar from - don't know it's technical name :) ) stayed. Does anybody know how to make it be transparent without the need of a new control template which requires me to build everything from scratch? I know i won't have any overflow items and the toolbar is fixed (can't be drag) i will appreciate a clue :) Yanai

      F Offline
      F Offline
      Fabio V Silva
      wrote on last edited by
      #2

      If you just want to hide the drag area of the ToolBar you could put it inside a ToolBarTray and set the ToolBarTray.IsLocked property to "True", if you also want to hide the overflow area you will need to define a new style for the ToolBar, for example:

              <Style x:Key="{x:Type ToolBar}" TargetType="{x:Type ToolBar}">
                  <Setter Property="OverridesDefaultStyle" Value="true"/>
                  <Setter Property="Template">
                      <Setter.Value>
                          <ControlTemplate TargetType="{x:Type ToolBar}">
                              <Border CornerRadius="2" BorderThickness="1" Background="Transparent" BorderBrush="Black">
                                  <ToolBarPanel IsItemsHost="true" Margin="0,1,2,2"/>
                              </Border>
                          </ControlTemplate>
                      </Setter.Value>
                  </Setter>
              </Style>code>
      
      Y 1 Reply Last reply
      0
      • F Fabio V Silva

        If you just want to hide the drag area of the ToolBar you could put it inside a ToolBarTray and set the ToolBarTray.IsLocked property to "True", if you also want to hide the overflow area you will need to define a new style for the ToolBar, for example:

                <Style x:Key="{x:Type ToolBar}" TargetType="{x:Type ToolBar}">
                    <Setter Property="OverridesDefaultStyle" Value="true"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ToolBar}">
                                <Border CornerRadius="2" BorderThickness="1" Background="Transparent" BorderBrush="Black">
                                    <ToolBarPanel IsItemsHost="true" Margin="0,1,2,2"/>
                                </Border>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>code>
        
        Y Offline
        Y Offline
        yanairon
        wrote on last edited by
        #3

        Thanks a lot, it's a great solution

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups