c# - Displaying an Image on a WPF page -
i trying display image on wpf page. code shown below:
<grid> <textblock margin="32,332,395,74" cursor="none"> click <hyperlink navigateuri="testwindow.xaml">sign document</hyperlink> </textblock> <image horizontalalignment="left" height="151" margin="32,96,0,0" verticalalignment="top" width="179" source="signature.png" visibility="visible" name="signimage"/>
the problem image shows in wpf designer when run program, image not display on page.
note image displayed on page not window
another option use resource, e.g. in app.xaml:
<application.resources> <bitmapimage x:key="signaturesrc" urisource="/myproject;component/imagefolderifthereisone/signature.png" /> </application.resources>
and use this
<image height="100" verticalalignment="top" width="100" source="{staticresource signaturesrc}" />
Comments
Post a Comment