Skip to content
Discussion options

You must be logged in to vote

Nothing should be invalidating the view so I don't understand why render is being called continuously

In this code:

        public override void Render( DrawingContext context )
        {
            context.Custom( new CustomDrawOp( new Rect( 0, 0, Bounds.Width, Bounds.Height ) ) );
            Dispatcher.UIThread.InvokeAsync( InvalidateVisual, DispatcherPriority.Background );
        }

You invalidate visual after each Render call. Basically, creating a control that requests a new render on each frame.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@FraserElectronics
Comment options

@cyraid
Comment options

@stevemonaco
Comment options

Answer selected by FraserElectronics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants