Modern UI with MahApps.Metro

As a MahApps.Metro member I'am often confronted with questions like:

»
Author's profile picture punker76 on modern ui, mahapps, mahapps.metro, wpf, and c#

How to set the scrolling lines for a WPF ListBox?

The default behavior for scrolling with the mouse wheel on a ListBox or ListView scrolls the entire view 3 lines up or down. That's for the most scenarios ok, but sometimes it could be necessary to scroll only 1 or n lines. But there is no property to set this and the ScrollViewer can not be accessed.

»
Author's profile picture punker76 on wpf and c#

How to make the ToolTip follow the mouse?

In a project of mine I needed a ToolTip. That's easy, I know, but I want a ToolTip that follows the mouse and not the default behavior. Normally a ToolTip opens and stays at this position on the target element. After leaving the element the ToolTip closes.

»
Author's profile picture punker76 on wpf and c#

Generate WPF ListView columns automatically

Sometimes it's not necessary to display a list of elements with a DataGrid, for a simple short way we can use the lighter ListView. My solution, also posted at stackoverflow, generates a ListView with columns for all properties with a given datatype automatically.

»
Author's profile picture punker76 on wpf, c#, and stackoverflow