Search Results

Search found 2 results on 1 pages for 'galacticgrug'.

Page 1/1 | 1 

  • Issue with child of custom Decorator class in WPF

    - by galacticgrug
    I need a custom border that renders a little differently than a normal border. I made a class that inherited from Decorator as follows class BetterBorder : Decorator { protected override Size ArrangeOverride(Size arrangeSize) { return arrangeSize; } protected override void OnRender(DrawingContext dc) { //these values are calculated elsewhere dc.DrawGeometry(backgroundBrush, borderPen, pathGeometry); } } //Properties and helper methods below this All of this works fine until I try to add a child to the control, the control can be added but is not visible and seems to be moved off BetterBorders visible client area. If I inherit from Border everything works fine, what am I missing?

    Read the article

  • Issue with child of custom Decorator class in WPF (c#)

    - by galacticgrug
    I need a custom border that renders a little differently than a normal border. I made a class that inherited from Decorator as follows class BetterBorder : Decorator { protected override Size ArrangeOverride(Size arrangeSize) { return arrangeSize; } protected override void OnRender(DrawingContext dc) { //these values are calculated elsewhere dc.DrawGeometry(backgroundBrush, borderPen, pathGeometry); } } //Properties and helper methods below this All of this works fine until I try to add a child to the control, the control can be added but is not visible and seems to be moved off BetterBorders visible client area. If I inherit from Border everything works fine, what am I missing?

    Read the article

1