%\showframe

\setuplayout
  [
    header=\lineheight,
    headerdistance=\lineheight,
  ]

\setuppagenumbering
  [
    location=,
    alternative=doublesided,
  ]

\definepagebreak
  [chapterpagebreak]
  [yes,empty,right]

\setuphead
  [chapter]
  [
    style=\bfc,
    header=high,
    before={\blank[force,\the\headerheight]},
    page=chapterpagebreak,
  ]

\setupheader[style=bold]

\setupheadertexts
  [{\getmarking[sectionnumber]\hskip1em\getmarking[section][first]}]
  [pagenumber]
  [{Chapter~\getmarking[chapternumber]\hskip1em\getmarking[chapter]}]
  [pagenumber]

\setupbackgrounds[header][text][bottomframe=on]

\starttext
\chapter{First Chapter}
this is the first chapter
\page   
the second page of the first chapter
\page
third page
\chapter{Second Chapter}
this is the second chapter
\page
the second page of the second chapter
\stoptext
