X-bracings are members that take load applied perpendicular to the main frame, although mostly they are Tension only member but not necessarily has to be tension only! In large multistory buildings where Wide flange beams and HSS are used they are also designed to take compression forces.
Anyhow for more clarification model a frame of 30ft span and 10ft height in any structural software (staad, sap, risa etc.) make sure it is modeled in a Space frame structure (3 axes) environment and not Plane frame environment.
(Coordinates of frame: (0, 0) (0, 10) (30, 0) (30, 10))
Apply a UDL of say 2Kip/ft and then design the frame; select a suitable section, and run a code check and section search till it passes with flying colors.
Now apply a point load of 5kip on any one column's top (eave) in Z direction. Say on coordinate (30, 10). Run analysis and code check again, you will see that the section fails with flying colors now. Go to model again and from the point where you applied the nodal load model another member (say angle L3x3x1/2) in -Z direction from (30, 10) to (30, 0,-10). Assign it a pin support at (30, 0,-and 10) make it a tension member only or truss. Now you will see that your section passes again.
Therefore x bracing acts a pull only rope in the perpendicular to framing direction.
I hope you get something out of this.