This paper gives theoretical analysis of visibility of fringes, which is influenced by distances, temporal and spatial coherence of source, in hard x-ray differential phase-contrast imaging with microfocus x-ray source. According to the character of longitudinal periodicity of the interferogram, the setup is insensitive to mechanical drift and vibrations. The effect of temporal coherence of x-ray source is investigated and its related bandwidth is derived. Based on the theory of partially coherent light, it shows that the requirement for the spatial coherence of x-ray source is not strict and can be met by the general microfocus x-ray tube for x-ray differential phase-contrast imaging.