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. Binding value of object to another object

Binding value of object to another object

Scheduled Pinned Locked Moved WCF and WF
wpfwcftutorialquestionlearning
5 Posts 3 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.
  • _ Offline
    _ Offline
    _iobuf
    wrote on last edited by
    #1

    I have a SolidColorBrush resource in one file, and I want to create a copy of it in another file. for example File 1: File 2: I'd like to avoid making a different object with that brush as the fill because that creates overhead. Any ideas?

    J L 2 Replies Last reply
    0
    • _ _iobuf

      I have a SolidColorBrush resource in one file, and I want to create a copy of it in another file. for example File 1: File 2: I'd like to avoid making a different object with that brush as the fill because that creates overhead. Any ideas?

      J Offline
      J Offline
      Jammer 0
      wrote on last edited by
      #2

      Use DynamicResource instead ... Create a brush:

      <SolidColorBrush x:Name="brush1" Color="White"/>

      <Grid.BitmapEffect>
      <OuterGlowBitmapEffect GlowColor="{DynamicResource brush1}" GlowSize="1"/>
      </Grid.BitmapEffect>

      Jammer My Blog | Article(s)

      _ 1 Reply Last reply
      0
      • J Jammer 0

        Use DynamicResource instead ... Create a brush:

        <SolidColorBrush x:Name="brush1" Color="White"/>

        <Grid.BitmapEffect>
        <OuterGlowBitmapEffect GlowColor="{DynamicResource brush1}" GlowSize="1"/>
        </Grid.BitmapEffect>

        Jammer My Blog | Article(s)

        _ Offline
        _ Offline
        _iobuf
        wrote on last edited by
        #3

        You can't use a brush as a color

        1 Reply Last reply
        0
        • _ _iobuf

          I have a SolidColorBrush resource in one file, and I want to create a copy of it in another file. for example File 1: File 2: I'd like to avoid making a different object with that brush as the fill because that creates overhead. Any ideas?

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

          _iobuf wrote:

          resource in one file, and I want to create a copy of it in another file

          Is there some reason that you do not want to use a resource dictionary?

          Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns

          _ 1 Reply Last reply
          0
          • L Lost User

            _iobuf wrote:

            resource in one file, and I want to create a copy of it in another file

            Is there some reason that you do not want to use a resource dictionary?

            Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Individuality is fine, as long as we do it together - F. Burns

            _ Offline
            _ Offline
            _iobuf
            wrote on last edited by
            #5

            It's because one file has references to colors using StaticResource, and another needs to reference them using DynamicResource so I can then bind the color statically. Basically, I want to have a constant pointer to a field which changes values.. The thing with adding extra objects works so that's kind of what I'm getting at, except I'd like to do it without the extra overhead.

            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