Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / Primitives / DragDeltaEventArgs.cs / 1305600 / DragDeltaEventArgs.cs
using System;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows;
namespace System.Windows.Controls.Primitives
{
///
/// This DragDeltaEventArgs class contains additional information about the
/// DragDeltaEvent event.
///
///
///
public class DragDeltaEventArgs: RoutedEventArgs
{
///
/// This is an instance constructor for the DragDeltaEventArgs class. It
/// is constructed with a reference to the event being raised.
///
/// Nothing.
public DragDeltaEventArgs(double horizontalChange, double verticalChange) : base()
{
_horizontalChange = horizontalChange;
_verticalChange = verticalChange;
RoutedEvent=Thumb.DragDeltaEvent;
}
///
/// Read-only access to the horizontal change.
///
public double HorizontalChange
{
get { return _horizontalChange; }
}
///
/// Read-only access to the vertical change.
///
public double VerticalChange
{
get { return _verticalChange; }
}
///
/// This method is used to perform the proper type casting in order to
/// call the type-safe DragDeltaEventHandler delegate for the DragDeltaEvent event.
///
/// The handler to invoke.
/// The current object along the event's route.
/// Nothing.
///
///
protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget)
{
DragDeltaEventHandler handler = (DragDeltaEventHandler)genericHandler;
handler(genericTarget, this);
}
private double _horizontalChange;
private double _verticalChange;
}
///
/// This delegate must used by handlers of the DragDeltaEvent event.
///
/// The current element along the event's route.
/// The event arguments containing additional information about the event.
/// Nothing.
public delegate void DragDeltaEventHandler(object sender, DragDeltaEventArgs e);
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows;
namespace System.Windows.Controls.Primitives
{
///
/// This DragDeltaEventArgs class contains additional information about the
/// DragDeltaEvent event.
///
///
///
public class DragDeltaEventArgs: RoutedEventArgs
{
///
/// This is an instance constructor for the DragDeltaEventArgs class. It
/// is constructed with a reference to the event being raised.
///
/// Nothing.
public DragDeltaEventArgs(double horizontalChange, double verticalChange) : base()
{
_horizontalChange = horizontalChange;
_verticalChange = verticalChange;
RoutedEvent=Thumb.DragDeltaEvent;
}
///
/// Read-only access to the horizontal change.
///
public double HorizontalChange
{
get { return _horizontalChange; }
}
///
/// Read-only access to the vertical change.
///
public double VerticalChange
{
get { return _verticalChange; }
}
///
/// This method is used to perform the proper type casting in order to
/// call the type-safe DragDeltaEventHandler delegate for the DragDeltaEvent event.
///
/// The handler to invoke.
/// The current object along the event's route.
/// Nothing.
///
///
protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget)
{
DragDeltaEventHandler handler = (DragDeltaEventHandler)genericHandler;
handler(genericTarget, this);
}
private double _horizontalChange;
private double _verticalChange;
}
///
/// This delegate must used by handlers of the DragDeltaEvent event.
///
/// The current element along the event's route.
/// The event arguments containing additional information about the event.
/// Nothing.
public delegate void DragDeltaEventHandler(object sender, DragDeltaEventArgs e);
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BitmapFrameDecode.cs
- InstanceKeyCollisionException.cs
- ServiceHandle.cs
- dtdvalidator.cs
- DataGridViewRowsRemovedEventArgs.cs
- HandlerFactoryWrapper.cs
- MachineKeySection.cs
- EdmSchemaError.cs
- BooleanFunctions.cs
- MediaPlayer.cs
- IntSecurity.cs
- RuntimeEnvironment.cs
- PipeSecurity.cs
- AssemblyHash.cs
- FrameworkContentElementAutomationPeer.cs
- EnumerableRowCollection.cs
- XmlQueryContext.cs
- SqlCrossApplyToCrossJoin.cs
- ProxyManager.cs
- OutputCacheProfile.cs
- SafeUserTokenHandle.cs
- _ShellExpression.cs
- PerformanceCounter.cs
- PeerOutputChannel.cs
- SignatureResourcePool.cs
- SerializationSectionGroup.cs
- XmlElementAttributes.cs
- ToolStripDropDown.cs
- TraceHandler.cs
- LookupTables.cs
- UInt32Converter.cs
- JsonObjectDataContract.cs
- LogicalExpressionEditor.cs
- CompressEmulationStream.cs
- ChannelBinding.cs
- FormClosingEvent.cs
- RegexCapture.cs
- SqlOuterApplyReducer.cs
- EventEntry.cs
- externdll.cs
- IdentityReference.cs
- FormConverter.cs
- AliasedSlot.cs
- CachedCompositeFamily.cs
- XamlUtilities.cs
- HyperLinkStyle.cs
- ControlPaint.cs
- PriorityBindingExpression.cs
- InvalidCastException.cs
- GridViewColumnCollectionChangedEventArgs.cs
- ExtentKey.cs
- TableCell.cs
- InvalidPrinterException.cs
- BitmapData.cs
- OpCodes.cs
- SynchronizationFilter.cs
- BuilderInfo.cs
- LocalServiceSecuritySettingsElement.cs
- Camera.cs
- Html32TextWriter.cs
- PermissionSet.cs
- TextTreeObjectNode.cs
- DataGridHelper.cs
- PersonalizableAttribute.cs
- DurationConverter.cs
- PaintValueEventArgs.cs
- SerializerWriterEventHandlers.cs
- UserControlAutomationPeer.cs
- PlainXmlWriter.cs
- AuthenticationException.cs
- PropertyFilter.cs
- TextEditorThreadLocalStore.cs
- ProtectedProviderSettings.cs
- LineServicesCallbacks.cs
- EditorZone.cs
- Regex.cs
- MenuScrollingVisibilityConverter.cs
- MenuItemStyleCollection.cs
- BindingCompleteEventArgs.cs
- UserPreferenceChangedEventArgs.cs
- SqlFactory.cs
- UpdatePanelControlTrigger.cs
- GridViewSortEventArgs.cs
- SqlError.cs
- ModuleBuilder.cs
- DocumentViewerAutomationPeer.cs
- ToolStripSeparatorRenderEventArgs.cs
- XmlIncludeAttribute.cs
- GestureRecognizer.cs
- DecoderExceptionFallback.cs
- DomNameTable.cs
- EntityReference.cs
- XmlSchemaImport.cs
- DocumentCollection.cs
- AttributeCollection.cs
- HttpBrowserCapabilitiesWrapper.cs
- HeaderedItemsControl.cs
- SafeNativeMethodsCLR.cs
- URLIdentityPermission.cs
- DecodeHelper.cs