Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / MS / Internal / Controls / WebBrowserNavigatingEventHandler.cs / 1 / WebBrowserNavigatingEventHandler.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Description:
// WebBrowserNavigatingEventHandler is used to listen to the
// DWebBrowserEvent2.BeforeNavigate event of the webbrowser control
//
// Copied from WebBrowserNavigatingEventHandlers.cs in winforms
//
// History
// 04/17/05 [....] Created
//
//-----------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Security.Permissions;
using System.Security;
using System.Runtime.InteropServices;
using System.Net;
namespace MS.Internal.Controls {
/// Delegate to the WebBrowser Navigating event.
internal delegate void WebBrowserNavigatingEventHandler(object sender, WebBrowserNavigatingEventArgs e);
/// Provides data for the event.
internal class WebBrowserNavigatingEventArgs : CancelEventArgs {
// Not a URI object - as the WEB OC gives this to us.
///
/// Critical: the uri can point to a loose content file in the ClickOnce cache
///
private SecurityCriticalData _browserUri ;
private string _targetFrameName;
/// Creates an instance of the class.
internal WebBrowserNavigatingEventArgs(string url, string targetFrameName) {
_browserUri = new SecurityCriticalData( new Uri(url) ) ;
_targetFrameName = targetFrameName;
}
/// Url the browser is navigating to.
///
/// Critical: Getter is critical because the uri can point to a loose content file in the ClickOnce cache
///
internal Uri Uri
{
[SecurityCritical]
get
{
//WebBrowser.EnsureUrlConnectPermission(url);
return _browserUri.Value;
}
}
// Commented out until it is needed to comply with FXCOP
///// In case an individual frame is about to be navigated, this contains the frame name.
//internal string TargetFrameName
//{
// get
// {
// //WebBrowser.EnsureUrlConnectPermission(url);
// return _targetFrameName;
// }
//}
}
}
// 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
- NaturalLanguageHyphenator.cs
- Comparer.cs
- MethodBuilder.cs
- ProfileWorkflowElement.cs
- Renderer.cs
- AsymmetricAlgorithm.cs
- Transform.cs
- FormClosedEvent.cs
- ImageIndexConverter.cs
- CodeDirectoryCompiler.cs
- Error.cs
- PageBuildProvider.cs
- CatalogPart.cs
- ButtonField.cs
- DataControlFieldCell.cs
- ScriptingWebServicesSectionGroup.cs
- DetailsViewModeEventArgs.cs
- RecordManager.cs
- SymmetricKeyWrap.cs
- DoubleLink.cs
- WebFormDesignerActionService.cs
- ItemCheckedEvent.cs
- PointAnimationBase.cs
- InstanceCollisionException.cs
- OdbcParameterCollection.cs
- DragSelectionMessageFilter.cs
- TextRangeEditLists.cs
- StringHelper.cs
- DropTarget.cs
- DataServiceStreamProviderWrapper.cs
- WebBrowserNavigatedEventHandler.cs
- XhtmlBasicSelectionListAdapter.cs
- Debug.cs
- SamlAttribute.cs
- MouseButton.cs
- ClientSettingsSection.cs
- SessionStateContainer.cs
- WorkItem.cs
- PersistenceTask.cs
- CommandEventArgs.cs
- AutoCompleteStringCollection.cs
- ContainerFilterService.cs
- AsnEncodedData.cs
- SoapMessage.cs
- WinEventTracker.cs
- DesignerDataParameter.cs
- SrgsElement.cs
- NotificationContext.cs
- VisualTreeHelper.cs
- TextParagraphProperties.cs
- CreateBookmarkScope.cs
- MILUtilities.cs
- BindingContext.cs
- DesignOnlyAttribute.cs
- DefaultValidator.cs
- ActivationWorker.cs
- CollectionView.cs
- PenThreadPool.cs
- Int64Converter.cs
- ConfigXmlAttribute.cs
- RectAnimation.cs
- DoubleAnimation.cs
- JsonQNameDataContract.cs
- ToolboxItemCollection.cs
- TaskExtensions.cs
- XmlBinaryWriter.cs
- PointCollectionConverter.cs
- ThrowHelper.cs
- FacetDescription.cs
- QuerySubExprEliminator.cs
- SiteMap.cs
- ErrorStyle.cs
- EntityDataReader.cs
- FreezableOperations.cs
- PkcsUtils.cs
- ComponentDispatcherThread.cs
- TagMapInfo.cs
- DesignerDataSourceView.cs
- PointCollectionConverter.cs
- PathGeometry.cs
- RegexRunner.cs
- HijriCalendar.cs
- UnsafeNativeMethods.cs
- XmlCollation.cs
- WeakReferenceKey.cs
- SocketCache.cs
- OpenTypeLayout.cs
- DeflateInput.cs
- SqlStream.cs
- ComponentChangedEvent.cs
- EnterpriseServicesHelper.cs
- StreamWithDictionary.cs
- SimplePropertyEntry.cs
- templategroup.cs
- SessionEndedEventArgs.cs
- OutputCacheModule.cs
- BindingList.cs
- HtmlShimManager.cs
- SoapElementAttribute.cs
- SafeCoTaskMem.cs