I do something similar. When the page orientation is changed I close a panel in my application. I do this in the triggered event when the orientation of the device changes.
public MainPage()
{
InitializeComponent();
this.OrientationChanged += OnOrientationChanged;
}
private void OnOrientationChanged(object sender, OrientationChangedEventArgs e)
{
var orientação = e.Orientation;
}
Seethe here documentation
p>
EDIT
Windows Phone does not have an event with an easy-to-identify name that indicates that this event will be triggered before the screen orientation is changed, but this event exists.
The BeginLayoutChanged event fires before the orientation of the phone changes.
BeginLayoutChanged += (o, args) => MessageBox.Show("Antes de Mudar");
OrientationChanged += (o, args) => MessageBox.Show("Depois de Mudar");
More information about the event here