简体   繁体   中英

Rect, where is it?

This drives me crazy, creating new console application project, then

// adding it as reference of course
using System.Windows;

// somewhere in method
var rect = new Rect(1, 2, 3, 4); // no Rect

The type or namespace name 'Rect' could not be found (are you missing a using directive or an assembly reference?)

What happens with Rect ?

您应该添加WindowsBase.dll作为对项目的引用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM