c# - Why won't this code-behind binding work? -


From

, I applied those 2 squares and tried it, and it works. I want to have a custom control which makes it equal, so I wrote it. However, it does not have to reproduce the image, it only produces an image without color. I think I am messing with the compulsive, but I'm not sure.

EDIT: The code changed to be an SSCE

  public class ColorableImage: Image used by the converter to stabilize the source for the project. Goes read-only Dependency Property Properties Property; Stable ColorableImage () {DefaultStyleKeyProperty.OverrideMetadata (ColorableImage), New FrameworkPropertyMetaTata (ColorableImage)); ColorProperty = DependencyProperty.Register ("Color", Typef (Color), Typef (Color Image), New Framework Property Metatata (New Property Changebackbackback (ColorProperty-Changed)); } Private Static Zero Color Correction (DependentObject Sender, Dependency InstalledGent Ergus E) {Color Image Junk Sensor = (Color Image) Sender; Image IMG = new image (); img.Source = Lattice. Source; Colored color = reticular Colour; Colour; Binding binding = new binding ("source") {source = img, converter = new highlighting converter (), converter piramet = color}; Reticular .Setbing (colorful image sourceproperty, binding); } The color of the public color {receive} return (color) gateway (colorproperty); } Set {set value (color, property, value); }}}   

}

edit:

Good, it's a little strange when the source property changes so you can change the OriginalImage. And when the OriginalImage changes, then the source uses binding to change something looks like an interval loop but in this case there will be a stack overflow exception.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -