I am learning WPF (v3, I think) and I need to make a reusable visual component that I *think* should be a usercontrol or a custom control, but there are just too many choices for the control implementation, for me to figure out how best/easiest to do this.
Plus, I cannot figure out how to do a certain aspect with WPF at all.
In short I need to make a simple "cut-out" shape-type control. While the final piece is quite complex, I can make it out of pieces and clips of several instances of the two built-in shape controls (rectangle and ellipse). This all works fine
unless I want the background to be transparent.
The reason that transparent is a problem is because of how I had to build it. My shape has curved sections or "bends" in it, which means that at those bends, there is a convex boundary (the outer-curve) and a
concave boundary (the inner-curve). In order to make this inner-bending boundary I had to use an ellipse shape and reverse the background and foreground colors, so that its background (the part
outside the ellipse) matched the foreground of the rest of may shape, thus blending in with it. Likewise the ellipse's foreground (the inside of the ellipse) matches the color of my shape's background, blending in seamlessly with it as well.
View Complete Post