Click here to Skip to main content
15,513,026 members
Home / Discussions / C#
   

C#

 
QuestionHow to connect two systems using C# without using any third server ? Pin
AshiSh RaNa4-Sep-14 4:16
AshiSh RaNa4-Sep-14 4:16 
AnswerRe: How to connect two systems using C# without using any third server ? Pin
Pete O'Hanlon4-Sep-14 4:25
mvaPete O'Hanlon4-Sep-14 4:25 
GeneralRe: How to connect two systems using C# without using any third server ? Pin
AshiSh RaNa5-Sep-14 4:34
AshiSh RaNa5-Sep-14 4:34 
GeneralRe: How to connect two systems using C# without using any third server ? Pin
jschell5-Sep-14 11:15
jschell5-Sep-14 11:15 
AnswerRe: How to connect two systems using C# without using any third server ? Pin
Bernhard Hiller4-Sep-14 21:55
Bernhard Hiller4-Sep-14 21:55 
GeneralRe: How to connect two systems using C# without using any third server ? Pin
AshiSh RaNa5-Sep-14 4:38
AshiSh RaNa5-Sep-14 4:38 
GeneralRe: How to connect two systems using C# without using any third server ? Pin
Nathan Minier5-Sep-14 4:43
professionalNathan Minier5-Sep-14 4:43 
Question'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
jasonalien4-Sep-14 3:04
jasonalien4-Sep-14 3:04 
Hello,
I have this C# code but I get the error in the title. on the "FromFile" part. I want to simply publish images in my PC on a WPF application.
How can I get rid of this error?
Thanks.

Code :
C#
using System.Drawing;

namespace Photo
{
   public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

           
            string filename1 = @"C:\images\mainicon.jpg";
            Image image1 = Image.FromFile(filename1);
        }
    }
}


Error :

'System.Windows.Controls.Image' does not contain a definition for 'FromFile'
AnswerRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
Richard Deeming4-Sep-14 3:31
mveRichard Deeming4-Sep-14 3:31 
AnswerRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
Deflinek4-Sep-14 3:44
Deflinek4-Sep-14 3:44 
GeneralRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
jasonalien4-Sep-14 3:47
jasonalien4-Sep-14 3:47 
GeneralRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
Deflinek4-Sep-14 3:54
Deflinek4-Sep-14 3:54 
AnswerRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
Swinkaran4-Sep-14 20:58
professionalSwinkaran4-Sep-14 20:58 
Questionhow to transfer the values of textboxes from one form to another form in datagridviw control without using database Pin
Member 110574883-Sep-14 19:56
Member 110574883-Sep-14 19:56 
AnswerRe: how to transfer the values of textboxes from one form to another form in datagridviw control without using database Pin
Ganesh KP3-Sep-14 20:19
professionalGanesh KP3-Sep-14 20:19 
AnswerRe: how to transfer the values of textboxes from one form to another form in datagridviw control without using database Pin
Pankaj Bhandari085-Sep-14 2:52
Pankaj Bhandari085-Sep-14 2:52 
QuestionNeed help with Expression Trees... Pin
SledgeHammer013-Sep-14 19:44
SledgeHammer013-Sep-14 19:44 
QuestionRe: Need help with Expression Trees... Pin
Richard Deeming4-Sep-14 2:23
mveRichard Deeming4-Sep-14 2:23 
AnswerRe: Need help with Expression Trees... Pin
SledgeHammer014-Sep-14 5:58
SledgeHammer014-Sep-14 5:58 
AnswerRe: Need help with Expression Trees... Pin
SledgeHammer014-Sep-14 9:30
SledgeHammer014-Sep-14 9:30 
GeneralRe: Need help with Expression Trees... Pin
Richard Deeming4-Sep-14 9:39
mveRichard Deeming4-Sep-14 9:39 
GeneralRe: Need help with Expression Trees... Pin
SledgeHammer014-Sep-14 11:19
SledgeHammer014-Sep-14 11:19 
AnswerRe: Need help with Expression Trees... Pin
Eddy Vluggen4-Sep-14 6:14
professionalEddy Vluggen4-Sep-14 6:14 
GeneralRe: Need help with Expression Trees... Pin
SledgeHammer014-Sep-14 8:29
SledgeHammer014-Sep-14 8:29 
QuestionFramework Update On a Soution Pin
wonder-FOOL3-Sep-14 11:21
wonder-FOOL3-Sep-14 11:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.