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. WPF
  4. WPF - Combine brushes

WPF - Combine brushes

Scheduled Pinned Locked Moved WPF
csharpwpfquestion
5 Posts 3 Posters 15 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.
  • J Offline
    J Offline
    Joachim Kerschbaumer
    wrote on last edited by
    #1

    Hi there, i wonder if there is a workaround to combine several brushes? i want to set the background of a small custom control and i need two different gradientbrushes (linear and radial). overlaying e.g. two canvas and setting their opacity to smthg. like 0.5 is no option for me. i´d be glad for any idea ;)

    J 1 Reply Last reply
    0
    • J Joachim Kerschbaumer

      Hi there, i wonder if there is a workaround to combine several brushes? i want to set the background of a small custom control and i need two different gradientbrushes (linear and radial). overlaying e.g. two canvas and setting their opacity to smthg. like 0.5 is no option for me. i´d be glad for any idea ;)

      J Offline
      J Offline
      Josh Smith
      wrote on last edited by
      #2

      Why not overlay two Canvas panels, each using a different brush, and then just use that as the Visual for a VisualBrush?

      :josh: My WPF Blog[^] All of life is just a big rambling blog post.

      J 1 Reply Last reply
      0
      • J Josh Smith

        Why not overlay two Canvas panels, each using a different brush, and then just use that as the Visual for a VisualBrush?

        :josh: My WPF Blog[^] All of life is just a big rambling blog post.

        J Offline
        J Offline
        Joachim Kerschbaumer
        wrote on last edited by
        #3

        i tried that and it worked great! thanks, you probably saved me a lot of time :)

        J 1 Reply Last reply
        0
        • J Joachim Kerschbaumer

          i tried that and it worked great! thanks, you probably saved me a lot of time :)

          J Offline
          J Offline
          Josh Smith
          wrote on last edited by
          #4

          Joachim Kerschbaumer wrote:

          thanks, you probably saved me a lot of time

          I charge a commission of five seconds for every minute I saved you. :)

          :josh: My WPF Blog[^] All of life is just a big rambling blog post.

          L 1 Reply Last reply
          0
          • J Josh Smith

            Joachim Kerschbaumer wrote:

            thanks, you probably saved me a lot of time

            I charge a commission of five seconds for every minute I saved you. :)

            :josh: My WPF Blog[^] All of life is just a big rambling blog post.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            cha, ching! :cool:

            Cheers, Karl My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your Articles

            Just a grain of sand on the worlds beaches.

            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