We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Manipulate Fontsize with mouse wheel as in Visual Studio

Thread ID:





106961 Feb 5,2013 04:06 AM UTC Feb 5,2013 08:34 AM UTC WPF 1
Tags: EditControl
Stephan Hartmann
Asked On February 5, 2013 04:06 AM UTC

is there a poossibilty to control font size as in Visual Studio 2010+
holding Strg and scrolling with mouse wheel
best regards

Stephan Hartmann
Replied On February 5, 2013 08:34 AM UTC

Ok, I answer myself - it was to easy :(
I use it in a Visual Studio Plugin so i had to use PreviewMouseWheel instead OnMouseWheel

private void SQLEdit_OnMouseWheel(object sender, MouseWheelEventArgs e)
bool handle = (Keyboard.Modifiers & ModifierKeys.Control) > 0;
if (!handle) return;
if (e.Delta > 0 &&  SQLEdit.FontSize < 40.0) SQLEdit.FontSize++;

if (e.Delta < 0 &&  SQLEdit.FontSize > 5.0) SQLEdit.FontSize--;          


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon