DarkMisha
DarkMisha

Reputation: 55

Missing "Bitmap" namespace in C# WPF project

I need to use "Bitmap" from namespace "System.Drawing" but there is nothing like this . If I create "Windows forms Application" there is not a problem like this.

How to use this "Bitmap" in my WPF project (add namespace that contains Bitmap class)? I use Microsoft Visual Studio 2015 RC.

Upvotes: 1

Views: 10369

Answers (2)

Bahman_Aries
Bahman_Aries

Reputation: 4798

This is my problem. System.Drawing not contain "Bitmap" namespace in WPF project, but when i create Windows Forms application there is Bitmap.

This is because WinForm has a reference to System.Drawing by default but WFP doesn't. So you need to add this reference manually (right-click on Solution Explorer -> References -> Add Reference ... ).

Upvotes: 4

DeshDeep Singh
DeshDeep Singh

Reputation: 1843

Look at this information: namespace to use in your class file is System.Drawing and refrence that you need to have is System.Drawing .

Namespace: System.Drawing Assembly: System.Drawing (in System.Drawing.dll)

Upvotes: 1

Related Questions