Page 1 of 1

Text drawn outside TextBox

Posted: 05 May 2015, 16:58
by ZanAlex
Hello,

I'm facing a weird problem with TextBox:

Image

I've noticed I have a similar problem when trying to use scrollable content, the supposed-to-be-hidden content is not clipped at all. However, I don't have the problem in the XamlPlayer. Is there something I'm missing in my integration?

Thanks

Re: Text drawn outside TextBox

Posted: 05 May 2015, 17:43
by jsantos
That is probably happening because you don't have a stencil surface bound when rendering. Do you have it?

Re: Text drawn outside TextBox

Posted: 06 May 2015, 09:28
by ZanAlex
Probably not, what is that? I haven't seen it in the tutorials.

Re: Text drawn outside TextBox

Posted: 06 May 2015, 16:19
by jsantos
You are right. We should explicitly comment about it in the integration tutorial. Anyway, it is shown in all our examples.

Apart from binding a color render target you need to bind a depthstencil surface (stencil only is enough, but normally they are created together) with 8 bits for the stencil.

Please, test it and tell us if that solves your problem.

We will improve the documentation regarding this.

Re: Text drawn outside TextBox

Posted: 18 May 2015, 10:14
by ZanAlex
Alright, the stencil surface fixes it, thank you again.