I can generate a BitmapSource
from a button fine, however it always is just the image of the normal state of the button.
I want to be able to generate a BitmapSource
of the over state of a button.
I tried calling
VisualStateManager.GoToState((FrameworkElement)target, "MouseOver", true);
before calling my code to generate the BitmapSource. It correctly changes the button to the overstate on the GUI, but the BitmapSource
is still that of the button in the normal state.