Click here to Skip to main content
15,893,161 members
Home / Discussions / C#
   

C#

 
QuestionGood article Pin
logicalweb6-Sep-14 0:11
logicalweb6-Sep-14 0:11 
AnswerRe: How it is different from below approach, find simplified version is below link Pin
Richard MacCutchan6-Sep-14 0:15
mveRichard MacCutchan6-Sep-14 0:15 
AnswerRe: Good article Pin
OriginalGriff6-Sep-14 0:49
mveOriginalGriff6-Sep-14 0:49 
QuestionGrouping the list in ListCollectionView in a WinRT XAML / C# app Pin
BadshaRulez5-Sep-14 19:22
BadshaRulez5-Sep-14 19:22 
AnswerRe: Grouping the list in ListCollectionView in a WinRT XAML / C# app Pin
George Jonsson8-Sep-14 20:21
professionalGeorge Jonsson8-Sep-14 20:21 
QuestionMessage Closed Pin
5-Sep-14 4:57
Member 110616635-Sep-14 4:57 
SuggestionRe: Need to POST xml data to web device w/ c# ASPX Pin
Richard MacCutchan5-Sep-14 5:03
mveRichard MacCutchan5-Sep-14 5:03 
QuestionHow to capture image from winForm application in c# Pin
jalbaji4-Sep-14 23:48
professionaljalbaji4-Sep-14 23:48 
AnswerRe: How to capture image from winForm application in c# Pin
OriginalGriff5-Sep-14 0:20
mveOriginalGriff5-Sep-14 0:20 
GeneralRe: How to capture image from winForm application in c# Pin
sankarsan parida5-Sep-14 20:57
professionalsankarsan parida5-Sep-14 20:57 
AnswerRe: How to capture image from winForm application in c# Pin
Pankaj Bhandari085-Sep-14 1:49
Pankaj Bhandari085-Sep-14 1:49 
QuestionRe: How to capture image from winForm application in c# Pin
Ravi Bhavnani5-Sep-14 3:57
professionalRavi Bhavnani5-Sep-14 3:57 
QuestionHow to connect two systems using C# without using any third server ? Pin
AshiSh RaNa4-Sep-14 3:16
AshiSh RaNa4-Sep-14 3:16 
AnswerRe: How to connect two systems using C# without using any third server ? Pin
Pete O'Hanlon4-Sep-14 3:25
mvePete O'Hanlon4-Sep-14 3:25 
GeneralRe: How to connect two systems using C# without using any third server ? Pin
AshiSh RaNa5-Sep-14 3:34
AshiSh RaNa5-Sep-14 3:34 
GeneralRe: How to connect two systems using C# without using any third server ? Pin
jschell5-Sep-14 10:15
jschell5-Sep-14 10:15 
AnswerRe: How to connect two systems using C# without using any third server ? Pin
Bernhard Hiller4-Sep-14 20:55
Bernhard Hiller4-Sep-14 20:55 
GeneralRe: How to connect two systems using C# without using any third server ? Pin
AshiSh RaNa5-Sep-14 3:38
AshiSh RaNa5-Sep-14 3:38 
GeneralRe: How to connect two systems using C# without using any third server ? Pin
Nathan Minier5-Sep-14 3:43
professionalNathan Minier5-Sep-14 3:43 
Question'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
jasonalien4-Sep-14 2:04
jasonalien4-Sep-14 2: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 2:31
mveRichard Deeming4-Sep-14 2:31 
AnswerRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
Deflinek4-Sep-14 2:44
Deflinek4-Sep-14 2:44 
GeneralRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
jasonalien4-Sep-14 2:47
jasonalien4-Sep-14 2:47 
GeneralRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
Deflinek4-Sep-14 2:54
Deflinek4-Sep-14 2:54 
AnswerRe: 'System.Windows.Controls.Image' does not contain a definition for 'FromFile' Pin
Swinkaran4-Sep-14 19:58
professionalSwinkaran4-Sep-14 19:58 

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.