(a) A trustee appointed by will to execute a trust contained in it may decline to accept the appointment by filing a statement of renunciation with the register of the county in which the will is admitted to probate before the trustee receives property or performs an act pursuant to the trust.
(b) (1) Unless the will provides otherwise, the trust shall thereafter be administered as if the trustee had not been appointed.
(2) The renunciation may not be construed to release or impair the right of the person to a legacy under the will by which the person was appointed trustee, unless the legacy is expressly declared in the will to be compensation for the person’s services as trustee.
(c) Unless the will provides otherwise, in all cases not provided for in this section, a trustee may renounce or resign the trustee’s trust only in accordance with the Maryland Rules.