Example 3 Given that the longest diagonal of a regular octagon is equal to $a$, and the shortest diagonal is equal to $b$. Then the area of this regular octagon is ( ). ${ }^{[3]}$
(A) $a^{2}+b^{2}$
(B) $a^{2}-b^{2}$
(C) $a+b$
(D) $a b$
(2009, Beijing Middle School Mathematics Competition (Grade 8))
Solve As shown in Figure 3, perform an equal-area transformation on the regular octagon. Then
$$
\begin{array}{l}
A E=M N=P Q=a, \\
P N=Q M=F D=b .
\end{array}
$$

Then $S_{\text {octagon } A C D E F C H}$
$$
=S_{\text {quadrilateral MNPQ }}=a b \text {. }
$$

Therefore, the answer is D.