c# - Datagrid textblock not aligned on left border -


this stupid problem, why can't find answer it.

i have datagrid in add messages every once in while during lengthy operation, , reason textblocks appear bit on right of left border of datagrid, though there no margin on textblock , no padding on datagrid :

enter image description here

here xaml :

<datagrid x:name="dgrdmessages" horizontalalignment="left" margin="21,212,0,0" verticalalignment="top" height="202" width="690">                     <datagrid.columns>                         <datagridtemplatecolumn header="message" width="*">                             <datagridtemplatecolumn.celltemplate>                                 <datatemplate>                                     <textblock text="{binding message}" width="auto" horizontalalignment="left" verticalalignment="top">                                         <textblock.style>                                             <style>                                                 <style.triggers>                                                     <datatrigger binding="{binding iserror}" value="true">                                                         <setter property="textelement.foreground" value="red"/>                                                     </datatrigger>                                                 </style.triggers>                                             </style>                                         </textblock.style>                                     </textblock>                                 </datatemplate>                             </datagridtemplatecolumn.celltemplate>                         </datagridtemplatecolumn>                     </datagrid.columns>                 </datagrid> 

any ideas ?

from screenshot not seems textblock "slightly on right" (they touch left border). want rid of "row selector", small gray button on left? if set headersvisibility="column" in xaml.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -