  Density profiles are investigated arising in a critical Ising model in two
dimensions which is confined to a rectangular domain with uniform or mixed
boundary conditions and arbitrary aspect ratio. For the cases in which the two
vertical sides of the rectangle have up-spin boundary conditions + and the two
horizontal sides with either down-spin boundary conditions $-$ or with
free-spin boundary conditions $f$, exact results are presented for the density
profiles of the energy and the order parameter which display a surprisingly
rich behavior. The new results follow by means of conformal transformations
from known results in the half plane with $+-+-+$ and $+f+f+$ boundary
conditions. The corners with mixed boundary conditions lead to interesting
behavior, even in the limit of a half-infinite strip. The behavior near these
corners can be described by a ``Corner-Operator-Expansion'', which is discussed
in the second part of the paper. The analytic predictions agree very well with
simulations, with no adjustable parameters.
