How Can put Icon In Button In WPF Technology?
Below Snippet Code:
Code:
<Button Grid.Column="0" Width="auto" HorizontalAlignment="Right" Margin="0,2,350,2" Opacity="0.8">
<Image Source="C:\Users\sanjay.vaniya\Desktop\New Design\New Design\img\gamespot_32.png" Width="20" Height="20" Margin="5,2,8,2" Opacity="0.8" VerticalAlignment="Center"/>
<TextBlock Text="Family And Social History" VerticalAlignment="Center" Margin="0,0,5,0" Width="auto" />
Re: How Can put Icon In Button In WPF Technology?
It's been a long while since I've done any WPF, but I don't think you can load an image by specifying it's file path. Instead, I believe you need to embed the image to reference it. Search bing or Google for "embed an image in wpf". There are quite a few examples out there.