Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the relevance of *.resx file in Windows Forms/controls? [duplicate]

Possible Duplicate:
purpose of form1.designer.cs and form1.resx

I Understand about *.designer file grouped with a windows form/control file. But not sure what is the relevance and use of *.resx file attached.

Can i not create a form/control with this file attached to it?

like image 299
Manish Basantani Avatar asked Jun 08 '10 10:06

Manish Basantani


People also ask

What is a .resx file?

A . resx file contains a standard set of header information that describes the format of the resource entries, and specifies the versioning information for the XML code that parses the data. These files contain all the strings, labels, captions, and titles for all text in the three IBM Cognos Office components.

What is RESX file in Windows form?

The . resx file contains resources. Like the image you assigned to the form's BackgroundImage property. The Windows Forms application template creates a default start-up form that always has a . resx file, although that's unnecessary because it doesn't contain any resources yet.

Are RESX files compiled?

resx file is compiled into a . resource file, which in turn is linked into a . resource. dll satellite file, referred to as a satellite DLL or Language Assembly.

How do I view a RESX file?

Open a . resx file in the XML (Text) editor. Press Ctrl+Alt+F or choose ReSharper | Windows | File Structure from the main menu . Alternatively, you can press Ctrl+Shift+A , start typing the command name in the popup, and then choose it there.


1 Answers

The Windows Forms designer persists designed forms by generating code. Lots of control properties are however difficult to express in code. A form's Icon property or a PictureBox' Image property for example. Lots of bytes associated with them. The .resx file format was optimized to store those property values.

A secondary use for them is to be able to easily localize your UI design. The designer makes it easy, it automatically generates .resx files for each language you support.

like image 167
Hans Passant Avatar answered Oct 22 '22 08:10

Hans Passant