|
|
logicalweb wrote: How it is different from below approach Your question is not clear, what are you referring to?
|
|
|
|
|
Don't post this here - if you got the code from an article, then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.
You looking for sympathy?
You'll find it in the dictionary, between sympathomimetic and sympatric
(Page 1788, if it helps)
|
|
|
|
|
I am working on a Windows Phone 8.1 app in XAML / C# and I am using the ListCollectionView[^] class to allow the list to be filtered. The problem is, I need to group the list, which that class doesn't support. I tried using LINQ, but it gave a it kept giving me an object initialization error at the ICompare method in ListCollectionView.cs. I also used the GroupKeyList.cs class and used the following line to create a grouped list:
MusicSource.Source = GroupKeyList.CreateGroupList(source, (Music sd) => { return sd.Artist; }); where MusicSource is a CollectionViewSource. Music.cs
However, it returns the same object initialization error at the same position. What am I doing wrong and how can I get the group to work (preferably with the GroupKeyList class)?
|
|
|
|
|
You should post your question in the Quick Answer section in order to get more responses.
|
|
|
|
|
|
You would probably get a faster response by posting this in the ASP.NET forum.
|
|
|
|
|
WinForm application for How to capture Image from any web cam and store it in a SQL Server using c#
|
|
|
|
|
|
nice solution
Sankarsan Parida
|
|
|
|
|
Do you want to capture image from a web cam ?
|
|
|
|
|
What have you tried? Where are you stuck?
/ravi
|
|
|
|
|
How to connect two systems using C# without using any third server ?
I want to create an gaming application(something like Tic-Tac-Toe game), which two players can play it via their own respective systems.
I don't know how to connect two different systems. It can be a Server Client connection or Peer-to-Peer connection.
|
|
|
|
|
The simplest way would be to use TCP. Alternatively, you could investigate using WCF and turn one of the clients into the host system.
|
|
|
|
|
Can you explain it further ? Please..
|
|
|
|
|
If you just want examples then Google for "chat" programs written in C#.
The basics that they use for communicating are the same you would need for a game.
If you want to start with the basics then look at the other response about socket communications.
|
|
|
|
|
In the same local area network (LAN) - or via the internet? The latter case is far too complicated for someone who has no experience with communication between two machines.
|
|
|
|
|
I want to connect via Internet.. No problem if it is too complicated.
Also tell me about the LAN method..
|
|
|
|
|
|
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 :
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'
|
|
|
|
|
At a guess, do you have a control on your window with the name set to "Image"?
Try creating an alias for the Image type name, or using the fully qualified type name:
using DrawingImage = System.Drawing.Image;
...
DrawingImage image1 = DrawingImage.FromFile(filename1);
var image1 = System.Drawing.Image.FromFile(filename1);
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Your codes contains
using System.Drawing
but you are getting error from System.Windows.Controls namespace. Most likely there is either some namespace confusion for compiler. Try specify the namespace explicitly in the last line:
Image image1 = System.Drawing.Image.FromFile(filename1);
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
Thank you for your reply, I did what you said and I get this :
The type or namespace name 'Image' does not exist in the namespace 'System.Drawing' (are you missing an assembly reference?)
Thanks.
|
|
|
|
|
Do you reference System.Drawing.dll in your project?
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
I'm sorry if I am wrong, but I would rather do this as follows. I guess this is a better way of loading the file dynamically
Uri filename1 = new Uri(@"C:\images\mainicon.jpg");
image1.Source = new BitmapImage(filename1);
Is this something helpful?
|
|
|
|