We introduce a structured illumination technique for dark-field x-ray microscopy optimized for three-dimensional imaging of ordered materials at sub-micrometer length scales. Our method utilizes a coded aperture to spatially modulate the incident x-ray beam on the sample, enabling the reconstruction of the sample's 3D structure from images captured at various aperture positions. Unlike common volumetric imaging techniques such as tomography, our approach casts a scanning x-ray silhouette of a coded aperture for depth resolution along the axis of diffraction, eliminating any need for sample rotation or rastering, leading to a highly stable imaging modality. This modification provides robustness against geometric uncertainties during data acquisition, particularly for achieving sub-micrometer resolutions where geometric uncertainties typically limit resolution. We introduce the image reconstruction model and validate our results with experimental data on an isolated twin domain within a bulk single crystal of an iron pnictide obtained using a dark-field x-ray microscope. This timely advancement aligns with the enhanced brightness upgrade of the world's synchrotron radiation facilities, opening unprecedented opportunities in imaging.