An x-ray imaging apparatus and a method of controlling the x-ray imaging apparatus are provided. The x-ray imaging apparatus a controller configured to control a display to display a first icon indicating a first mounting portion and a second icon indicating a second mounting portion, to receive a user selection the first icon or the second icon that are displayed; and to control the display to distinguish the first icon from the second icon by displaying the first icon in a first color different than a second color of the second icon; to receive state information of a first x-ray detector that is mounted in the first mounting portion; to control the display to maintain display of the second icon that is displayed; and to control the display to display the state information of the first x-ray detector.