private void ImageButtonPreviousActions_MouseDown(object sender, MouseButtonEventArgs e) { Debug.WriteLine(SCRV_MenuOptions.HorizontalOffset); SCRV_MenuOptions.ScrollToHorizontalOffset(SCRV_MenuOptions.HorizontalOffset - 300); CheckActionButtons(-300); }
void CheckControlPanelSize() { //Debug.WriteLine("SCR AW: " + SCRV_MenuOptions.ActualWidth + " SP AW: " + SP_ActionControlPanel.ActualWidth + " offset: " + SCRV_MenuOptions.HorizontalOffset); /* * if (SCRV_MenuOptions.ScrollableWidth > 0) * { * SP_MenuPanelControls.Visibility = Visibility.Visible; * } * else * { * SP_MenuPanelControls.Visibility = Visibility.Collapsed; * } */ if (SCRV_MenuOptions.ActualWidth >= SP_ActionControlPanel.ActualWidth) { SP_MenuPanelControls.Visibility = Visibility.Collapsed; SCRV_MenuOptions.ScrollToHorizontalOffset(0); } else { SP_MenuPanelControls.Visibility = Visibility.Visible; } CheckActionButtons(); }
private void MainWindow_StateChanged(object sender, EventArgs e) { CheckState(); SCRV_MenuOptions.ScrollToHorizontalOffset(0); }