c# - how to avoid a single pixel line disappear in wpf? -


i use path element(strokethickness="1" snapstodevicepixels="true") in grid. want resize window, grid element wrapped viewbox element.

problem

when resize window, path disappear time. if turn snapstodevicepixels false, path element may blur not want.

how avoid single pixel line dispear?

the xaml code:

<window x:class="wpfapplication2.mainwindow"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     title="mainwindow" height="207" width="475">    <viewbox stretch="fill">        <grid height="320" width="517">           <path data="m0,0 h1 z" strokethickness="1" stroke="black" margin="72,73,79,218" stretch="fill" snapstodevicepixels="true" minheight="1"/>        </grid>    </viewbox> 

pity have no reputation post runtime effect.


Popular posts from this blog