Enabling/Disabling canvas?

Sorry if this is in the wrong place, first time here. Is there a canvas property to enable or disable a canvas at any point? I have an event and I want my canvas to be shown during the event. here is the documentation to the canvas I am talking about

Have you tried to deactivate the gameobject containing the canvas?
canvas.gameObject.SetActive(false);

ill try this thanks