Web
Telerik RadControls for Silverlight provide three routed events in addition to the Silverlight mouse events: MouseWheel, MouseDown and MouseUp. The latter two enable the developers to check for DoubleClick and RightClick in their applications. I will briefly show how to use this functionality: 1) MouseWheel: using Telerik.Windows.Input;
...
Mouse.AddMouseWheelHandler(element, OnMouseWheel);
...
private void OnMouseWheel(object sender, MouseWheelEventArgs args)
{
var delta = args.Delta;
}
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; } In most cases you just need to make a ScrollViewer to respond on the mouse wheel rotations. We implemented this in the ScrollViewerExtensions.EnableMouseWheel attached behavior, so you don't have to: xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
<ScrollViewer telerik:ScrollViewerExtensions.EnableMouseWheel="true">
...
</ScrollViewer>
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; } NOTE: To successfully handle the mouse wheel events, the Silverlight plugin should be in windowless mode. 2) RightClick using Telerik.Windows.Input;
...
Mouse.AddMouseUpHandler(element, OnMouseUp);
...
private void OnMouseUp(object sender,...