Let $G$ be a topological group of totally disconnected type, and let $(\pi,V)$ be a smooth representation of $G$, for $V$ a complex vector space. Then $\pi$ induces a representation on the dual $\textrm{Hom}_{\mathbb{C}}(V,\mathbb{C})$ by $(g \cdot \phi)(v) = \phi(\pi(g)^{-1}v)$. An element $\phi \in \textrm{Hom}_{\mathbb{C}}(V,\mathbb{C})$ is called smooth with respect to $\pi$ if the stabilizer of $\phi$ in $G$ is open. The restriction of the representation of $G$ to the subspace $\tilde{V}$ of smooth functionals is called the contragredient representation of $G$, denoted $\tilde{\pi}$.
Now, assume $V$ is a Hilbert space with inner product $(-,-)$. Then $\pi$ is called unitary if $(\pi(g)v,\pi(g)w) = (v,w)$ for all $v, w \in V$ and $g \in G$. The continuous dual $V^{\ast}$ is the subspace of $\textrm{Hom}_{\mathbb{C}}(V,\mathbb{C})$ consisting of bounded linear functionals. The Riesz representation theorem says that $v \mapsto (-,v)$ is bijection $V \rightarrow V^{\ast}$.
Do we always have $V^{\ast} = \tilde{V}$? The containment $V^{\ast} \subseteq \tilde{V}$ is clear, because if $\phi \in V^{\ast}$, then $\phi = (-,v)$ for some $v \in V$, and then the stabilizer of $\phi$ is exactly the stabilizer of $v$.
The converse inclusion isn't obvious to me. Is it true? Perhaps I need to also assume that $\pi$ is admissible?
I think I figured it out under the assumption that $\pi$ is admissible. Begin with a linear map $\phi:V \rightarrow \mathbb{C}$ whose stabilizer is open. We want to show that $\phi$ is a bounded linear operator. An open stabilizer tells us that there is an open compact subgroup $K$ of $G$ such that $\pi(k)v - v \in \textrm{Ker }\phi$ for all $v \in V$ and $k \in K$. We have a decomposition
$$V = V^K \oplus V(K)$$
where $V^K = \{v \in V: \pi(k)v = v \textrm{ for all } k\in K\}$, and $V(K)$ is the linear span of $\pi(k)v - v : k \in K, v \in V$ (e.g. first chapter of Henniart and Bushnell, Local Langlands Conjectures for $\textrm{GL}_2$). The space $V(K)$ is the unique $K$-stable complement of $V^K$ in $V$.
Assuming $\pi$ is admissible, $V^K$ is finite dimensional, hence it is a closed subspace of $V$. Thus $(V^K)^{ \perp} = \{ v \in V : (V^K,v) = 0\}$ is a $K$-stable complement of $V^K$. By uniqueness, we get $(V^K)^{\perp} = V(K)$.
Then $V(K)$ is contained in the kernel of $\phi$, every $v \in V$ can be expressed uniquely as $v_1 + v_2$ with $v_1 \in V^K, v_2 \in V(K)$, and we have $||v|| = ||v_1|| + ||v_2||$, and since $V^K$ is finite dimensional, there is definitely a constant $C > 0 $ such that $|\phi(v_1)| \leq C ||v_1||$ for all $v_1 \in V^K$. Then for all $v = v_1 + v_2 \in V$, we have
$$|\phi(v)| = |\phi(v_1)| \leq C||v_1|| \leq C(||v_1|| + ||v_2||) = C||v_1 + v_2|| = C||v||$$
so $\phi$ is bounded, as required.