I have a function f(u,v) of two variables

If I set $\displaystyle w = u\sin \theta + v \cos \theta$, how do I show then that

$\displaystyle \frac{ d f}{dw} = \sin \theta \frac{ \partial f}{ \partial u} + \cos \theta \frac{ \partial f}{ \partial v} $ ?

My book states this but I was wondering what rule was used to get this

Thanks very much