How to set TextOptions for a TextBlock in code behind in c# WPF? -
i adding dynamically generated textblock in code behind in wpf. need set following properties textblock in code behind not able so:
- textoptions.textformattingmode="display"
- renderoptions.bitmapscalingmode='nearestneighbor"
- renderoptions.cleartypehint="enabled"
i cannot find them in code behind or way so. can please suggest how these properties can set in code ?
i looking same solution ... here :)
in case set properties richtextbox
richtxteditor.setvalue(textoptions.textrenderingmodeproperty, textrenderingmode.aliased) richtxteditor.setvalue(textoptions.textrenderingmodeproperty, textrenderingmode.auto) richtxteditor.setvalue(textoptions.textrenderingmodeproperty, textrenderingmode.cleartype) richtxteditor.setvalue(textoptions.textrenderingmodeproperty, textrenderingmode.grayscale) richtxteditor.setvalue(textoptions.textformattingmodeproperty, textformattingmode.display) richtxteditor.setvalue(textoptions.textformattingmodeproperty, textformattingmode.ideal) richtxteditor.setvalue(textoptions.texthintingmodeproperty, texthintingmode.animated) richtxteditor.setvalue(textoptions.texthintingmodeproperty, texthintingmode.auto) richtxteditor.setvalue(textoptions.texthintingmodeproperty, texthintingmode.fixed)
Comments
Post a Comment