.net - Indicating Selection in Flowdocument -


this 1 tricky, have number of table cells in flowdocument, need able indicate different items colored left border.

i've solved putting 4 pixel transparent border on tablecell name, , using findname find element , switching borderbrush colored border.

  <tablecell borderbrush="transparent" borderthickness="4 0 0 0" padding="0 0 4 0" name="cell_1"/> 

the problem is slow large documents, think changing borderbrush on tablecell causing whole layout recalculate itself

anyone have ideas around this, guess either have prevent layout recalculating, option try find rectangle/coordinates of cell , overlay marker have been able find way that.

i know flowdocument not suited control kind of stuff layout reasons it's 1 have use. help/ideas appreciated

i recommend using adorners. however, since tablecell doesn't inherit uicontainer, can't adorn it. instead, can set content of each of tablecell's blockcollection richtextbox (use textbox better performance). name richtextbox control , use findname on instead. create , add adorner each of cell's richtextbox's want create selection for.

if can't use nested richtextbox, can adorn richtextbox owns main flowdocument. adds complexity because have coordinates of tablecell , transform relative richtextbox.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -