Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c# GridViewColumns missing assembly reference

I am trying to use 'System.Windows.Controls.GridViewColumn' within Visual Studio 2013, .net 4.5, but I am receiving this error :

The type 'GridViewColumn' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.

Looking within my Reference Manager, I have this message under the Assemblies tab :

All of the Framework assemblies are already referenced. Please use the Object Browser to explore the references in the Framework.

When I browse through I cannot find 'PresentationFramework.dll'. Here is the MSDN for the class : http://msdn.microsoft.com/en-us/library/system.windows.controls.gridviewcolumn(v=vs.110).aspx

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

I have tried to add using System.Windows.Controls.GridViewColumn but am receiving this error:

The type or namespace name Controls does not exist in the namespace System.Windows (are you missing an assembly reference?)

EDIT:

For WhyCry, when I search as you suggested I still don't get any results. enter image description here Perhaps I need to use a different GridView? Maybe Windows.UI.Xaml.Controls?

like image 760
Brian Avatar asked Aug 12 '14 18:08

Brian


People also ask

What C is used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

Is C language easy?

Compared to other languages—like Java, PHP, or C#—C is a relatively simple language to learn for anyone just starting to learn computer programming because of its limited number of keywords.

What is C in C language?

What is C? C is a general-purpose programming language created by Dennis Ritchie at the Bell Laboratories in 1972. It is a very popular language, despite being old. C is strongly associated with UNIX, as it was developed to write the UNIX operating system.

What is C full form?

Full form of C is “COMPILE”. One thing which was missing in C language was further added to C++ that is 'the concept of CLASSES'.


1 Answers

As you're creating Windows store apps, which is based on WinRT, while this GridViewColumn control is one of the WPF controls.

WPF and WinRT are mutually exclusive, you can not use WPF control in Windows Store apps. Please read this: Windows 8 Store Applications Vs. WPF Applications

like image 194
Matt Avatar answered Sep 30 '22 01:09

Matt