Under the Canadian income tax system, you liability for income tax is based on your status as a resident or non-resident of Canada for income tax purpose.
If you are a resident in Canada during a tax year, you are subject to Canadian income tax on your worldwide income from all sources both inside and outside of Canada.
However, you are only subject to Canadian income tax on income from sources inside Canada if you are a non-resident for income tax purpose.
Part year resident
You may be resident in Canada for only part of a year, for example, an emigrant, in which case you will only be subject to Canadian tax on your world wide income during the part of the year in which you are resident; during the other part of the year, you will be taxed a non-resident.