Creating a custom viewport display mode button

you have to use !_SetDisplayMode Mode=ShadedNoLines