Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Media / Effects / OuterGlowBitmapEffect.cs / 1 / OuterGlowBitmapEffect.cs
//------------------------------------------------------------------------------
// Microsoft Avalon
// Copyright (c) Microsoft Corporation, 2005
//
// File: OuterGlowBitmapEffect.cs
//-----------------------------------------------------------------------------
using MS.Internal;
using System;
using System.IO;
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Media;
using System.Windows.Markup;
using System.Windows.Media.Animation;
using System.Windows.Media.Composition;
using MS.Internal.PresentationCore;
using System.Security;
namespace System.Windows.Media.Effects
{
///
/// OuterGlowBitmapEffectPrimitive
///
public sealed partial class OuterGlowBitmapEffect : BitmapEffect
{
///
/// Constructor
///
public OuterGlowBitmapEffect()
{
}
///
/// Creates the unmanaged effect handle
///
unsafe protected override SafeHandle CreateUnmanagedEffect()
{
return Create(new Guid(0xe2161bdd, 0x7eb6, 0x4725, 0x9c, 0x0b, 0x8a, 0x2a, 0x1b, 0x4f, 0x06, 0x67));
}
///
/// Update (propagetes) properties to the unmanaged effect
///
///
/// This method demands permission because effects should not be run
/// in partial trust.
///
/// SecurityCritical - because SetValue has a link demand
/// SecutiryTreatAsSafe - because it demans UIWindow permission
///
[SecurityCritical, SecurityTreatAsSafe]
protected override void UpdateUnmanagedPropertyState(SafeHandle unmanagedEffect)
{
SecurityHelper.DemandUIWindowPermission();
BitmapEffect.SetValue(unmanagedEffect, "GlowSize", this.GlowSize);
BitmapEffect.SetValue(unmanagedEffect, "GlowColor", this.GlowColor);
BitmapEffect.SetValue(unmanagedEffect, "Opacity", this.Opacity);
BitmapEffect.SetValue(unmanagedEffect, "Noise", this.Noise);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
// Microsoft Avalon
// Copyright (c) Microsoft Corporation, 2005
//
// File: OuterGlowBitmapEffect.cs
//-----------------------------------------------------------------------------
using MS.Internal;
using System;
using System.IO;
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Media;
using System.Windows.Markup;
using System.Windows.Media.Animation;
using System.Windows.Media.Composition;
using MS.Internal.PresentationCore;
using System.Security;
namespace System.Windows.Media.Effects
{
///
/// OuterGlowBitmapEffectPrimitive
///
public sealed partial class OuterGlowBitmapEffect : BitmapEffect
{
///
/// Constructor
///
public OuterGlowBitmapEffect()
{
}
///
/// Creates the unmanaged effect handle
///
unsafe protected override SafeHandle CreateUnmanagedEffect()
{
return Create(new Guid(0xe2161bdd, 0x7eb6, 0x4725, 0x9c, 0x0b, 0x8a, 0x2a, 0x1b, 0x4f, 0x06, 0x67));
}
///
/// Update (propagetes) properties to the unmanaged effect
///
///
/// This method demands permission because effects should not be run
/// in partial trust.
///
/// SecurityCritical - because SetValue has a link demand
/// SecutiryTreatAsSafe - because it demans UIWindow permission
///
[SecurityCritical, SecurityTreatAsSafe]
protected override void UpdateUnmanagedPropertyState(SafeHandle unmanagedEffect)
{
SecurityHelper.DemandUIWindowPermission();
BitmapEffect.SetValue(unmanagedEffect, "GlowSize", this.GlowSize);
BitmapEffect.SetValue(unmanagedEffect, "GlowColor", this.GlowColor);
BitmapEffect.SetValue(unmanagedEffect, "Opacity", this.Opacity);
BitmapEffect.SetValue(unmanagedEffect, "Noise", this.Noise);
}
}
}
// 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
- DocumentPaginator.cs
- Effect.cs
- HybridObjectCache.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- RegionData.cs
- ServiceOperationParameter.cs
- MimeBasePart.cs
- XPathSingletonIterator.cs
- ItemChangedEventArgs.cs
- Debugger.cs
- TextSegment.cs
- ReflectionUtil.cs
- ContractCodeDomInfo.cs
- EdmType.cs
- UInt16Storage.cs
- DataGridViewLayoutData.cs
- ConstantProjectedSlot.cs
- DataPagerFieldCommandEventArgs.cs
- TextRangeBase.cs
- Ticks.cs
- DuplicateWaitObjectException.cs
- LineSegment.cs
- XmlnsCompatibleWithAttribute.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- CustomErrorsSectionWrapper.cs
- UriTemplateDispatchFormatter.cs
- DecimalConstantAttribute.cs
- BindingsCollection.cs
- FileDataSourceCache.cs
- BridgeDataReader.cs
- DataGridLinkButton.cs
- ListViewDeleteEventArgs.cs
- DataGridViewCellEventArgs.cs
- UpdatePanelTriggerCollection.cs
- SoapIncludeAttribute.cs
- KeyInterop.cs
- URL.cs
- AuthenticatingEventArgs.cs
- ReachFixedDocumentSerializer.cs
- PackWebRequest.cs
- PrintControllerWithStatusDialog.cs
- COM2ExtendedTypeConverter.cs
- DispatcherFrame.cs
- PerspectiveCamera.cs
- OutputCacheModule.cs
- AddressAlreadyInUseException.cs
- WebPartManagerDesigner.cs
- ObjectStateFormatter.cs
- InternalPermissions.cs
- VirtualPathUtility.cs
- FontDriver.cs
- FrameDimension.cs
- MsmqIntegrationSecurityMode.cs
- webproxy.cs
- ButtonBaseAutomationPeer.cs
- ImportContext.cs
- WindowsListViewScroll.cs
- ApplicationDirectoryMembershipCondition.cs
- WpfPayload.cs
- ContextMenuService.cs
- BasicDesignerLoader.cs
- StatusBarItemAutomationPeer.cs
- KnownBoxes.cs
- UrlPropertyAttribute.cs
- SessionState.cs
- FontStretchConverter.cs
- NativeActivityContext.cs
- PersistenceTypeAttribute.cs
- NameTable.cs
- IntPtr.cs
- sqlstateclientmanager.cs
- NotifyParentPropertyAttribute.cs
- WebSysDisplayNameAttribute.cs
- FaultCode.cs
- LiteralTextParser.cs
- ArraySegment.cs
- BamlLocalizableResource.cs
- VectorCollectionConverter.cs
- PersianCalendar.cs
- metadatamappinghashervisitor.cs
- SqlDataSourceRefreshSchemaForm.cs
- CategoryNameCollection.cs
- Restrictions.cs
- ExpandCollapsePattern.cs
- ActivationArguments.cs
- ItemsPanelTemplate.cs
- DiscoveryClientReferences.cs
- XsltException.cs
- Int64AnimationUsingKeyFrames.cs
- SchemaContext.cs
- ClientApiGenerator.cs
- AttachedPropertyMethodSelector.cs
- X509Certificate2Collection.cs
- ToolStripDropDownButton.cs
- DeferredTextReference.cs
- XmlSchemaAnyAttribute.cs
- SqlConnectionPoolProviderInfo.cs
- ManagementClass.cs
- ParseChildrenAsPropertiesAttribute.cs
- Resources.Designer.cs