When you need your polygon symbol to be fully transparent, assign a null color to the fill symbol as others have suggested. Another way would be to set the Transparency of the fill color to 255, which has the same effect. You can also set your simple fill style to hollow. All this can be done for graphic elements so your drawings persist in the map.
If you want to draw with transparency values other than 0 or 255, you can draw using display filters. See the code below:
// as an example, we'll draw a rectangle in the middle of the current extent
var rectangle = activeView.Extent;
rectangle.Expand(0.5, 0.5, true); // create a rectangle in the middle
var lineSymbol = new SimpleLineSymbolClass();
lineSymbol.Style = esriSimpleLineStyle.esriSLSSolid;
lineSymbol.Color = new RgbColorClass {Red = 0, Green = 0, Blue = 0};
var fillSymbol = new SimpleFillSymbolClass
{
Style = esriSimpleFillStyle.esriSFSSolid,
Outline = lineSymbol,
Color = new RgbColorClass { Red = 255, Green = 0, Blue = 0}
};
var screenDisplay = activeView.ScreenDisplay;
var transparencyDisplayFilter = new TransparencyDisplayFilterClass
{
Transparency = 127
};
try
{
screenDisplay.StartDrawing(0, (short)esriScreenCache.esriNoScreenCache);
screenDisplay.Filter = transparencyDisplayFilter;
screenDisplay.SetSymbol(fillSymbol);
screenDisplay.DrawRectangle(rectangle);
}
finally
{
screenDisplay.FinishDrawing();
}
This draws a red rectangle semi-transparent (semi-opaque) in the map's display. It can be easily modified to draw any geometry, like polygons, the rectangle was just easy to construct for the sake of the example.
However, as you can see, the code does not (and cannot) use any graphic elements, so if you draw this way, the drawing does not persist in the display when it gets refreshed. One way to solve is to run any drawing code like this in the IActiveViewEvents.AfterDraw event so it gets executed after every refresh.