I have a custom TextBox which overrides the `OnRender` method. Unfortunately, `OnRender` does not work properly when I add more than 143-145 TextBoxes to the grid.

This is what a windows with 160 TextBoxes looks like in the wpf designer. Each TextBox sets the border brush to red in the `OnRender` Method. For the last column of textboxes, `OnRender` does not work anymore. 

[render test example http://s3.postimage.org/id6jvq09n/render\_Test\_Example.png](http://s3.postimage.org/id6jvq09n/render_Test_Example.png)

The problem is not bound to the wpf designer, the same happens at runtime. Funnilly enough, if you delete one component inside the designer or at runtime once it has been rendered, then all the other controls suddenly work.

example code:

[MytextBox.cs](http://pastebin.com/ks1pCj23)   

[RenderTestPanel.xaml](http://pastebin.com/fwfsYwaa)  

[RenderTestPanel.xaml.cs](http://pastebin.com/A1GyPN1P)