We study topological transitivity/hypercyclicity and topological (weak) mixing for weighted composition operators on locally convex spaces of scalar-valued functions which are defined by local properties. As main application of our general approach we characterize these dynamical properties for weighted composition operators on spaces of ultradifferentiable functions, both of Beurling and Roumieu type, and on spaces of zero solutions of elliptic partial differential equations. Special attention is given to eigenspaces of the Laplace operator and the Cauchy-Riemann operator, respectively. Moreover, we show that our abstract approach unifies existing results which characterize hypercyclicity, resp. topological mixing, of (weighted) composition operators on the space of holomorphic functions on a simply connected domain in the complex plane, on the space of smooth functions on an open subset of R d , as well as results characterizing topological transitiviy of such operators on the space of real analytic functions on an open subset of R d .