Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Media / RenderOptions.cs / 1 / RenderOptions.cs
//------------------------------------------------------------------------------ // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // The RenderOptions class provides definitions of attached properties // which will control rendering. // //----------------------------------------------------------------------------- using System; using System.Diagnostics; namespace System.Windows.Media { ////// RenderOptions - /// The RenderOptions class provides definitions of attached properties /// which will control rendering. /// public static class RenderOptions { // // EdgeMode // ////// EdgeModeProperty - Enum which descibes the manner in which we render edges of non-text primitives. /// public static readonly DependencyProperty EdgeModeProperty = DependencyProperty.RegisterAttached("EdgeMode", typeof(EdgeMode), typeof(RenderOptions), new UIPropertyMetadata(EdgeMode.Unspecified), new ValidateValueCallback(System.Windows.Media.ValidateEnums.IsEdgeModeValid)); ////// Reads the attached property EdgeMode from the given object. /// [AttachedPropertyBrowsableForType(typeof(DependencyObject))] public static EdgeMode GetEdgeMode(DependencyObject target) { if (target == null) { throw new ArgumentNullException("target"); } return (EdgeMode)target.GetValue(EdgeModeProperty); } ////// Writes the attached property EdgeMode to the given object. /// public static void SetEdgeMode(DependencyObject target, EdgeMode edgeMode) { if (target == null) { throw new ArgumentNullException("target"); } target.SetValue(EdgeModeProperty, edgeMode); } // // BitmapScaling // ////// BitmapScalingModeProperty - Enum which descibes the manner in which we scale the images. /// public static readonly DependencyProperty BitmapScalingModeProperty = DependencyProperty.RegisterAttached("BitmapScalingMode", typeof(BitmapScalingMode), typeof(RenderOptions), new UIPropertyMetadata(BitmapScalingMode.Unspecified), new ValidateValueCallback(System.Windows.Media.ValidateEnums.IsBitmapScalingModeValid)); ////// Reads the attached property BitmapScalingMode from the given object. /// [AttachedPropertyBrowsableForType(typeof(DependencyObject))] public static BitmapScalingMode GetBitmapScalingMode(DependencyObject target) { if (target == null) { throw new ArgumentNullException("target"); } return (BitmapScalingMode)target.GetValue(BitmapScalingModeProperty); } ////// Writes the attached property BitmapScalingMode to the given object. /// public static void SetBitmapScalingMode(DependencyObject target, BitmapScalingMode bitmapScalingMode) { if (target == null) { throw new ArgumentNullException("target"); } target.SetValue(BitmapScalingModeProperty, bitmapScalingMode); } // // CachingHint // ////// CachingHintProperty - Hints the rendering engine that rendered content should be cached /// when possible. This is currently supported on TileBrush. /// public static readonly DependencyProperty CachingHintProperty = DependencyProperty.RegisterAttached("CachingHint", typeof(CachingHint), typeof(RenderOptions), new UIPropertyMetadata(CachingHint.Unspecified), new ValidateValueCallback(System.Windows.Media.ValidateEnums.IsCachingHintValid)); ////// Reads the attached property CachingHint from the given object. /// [AttachedPropertyBrowsableForType(typeof(TileBrush))] public static CachingHint GetCachingHint(DependencyObject target) { if (target == null) { throw new ArgumentNullException("target"); } return (CachingHint)target.GetValue(CachingHintProperty); } ////// Writes the attached property CachingHint to the given object. /// public static void SetCachingHint(DependencyObject target, CachingHint cachingHint) { if (target == null) { throw new ArgumentNullException("target"); } target.SetValue(CachingHintProperty, cachingHint); } // // CacheInvalidationThresholdMinimum // ////// CacheInvalidationThresholdMinimum - /// public static readonly DependencyProperty CacheInvalidationThresholdMinimumProperty = DependencyProperty.RegisterAttached("CacheInvalidationThresholdMinimum", typeof(double), typeof(RenderOptions), new UIPropertyMetadata(0.707), /* ValidateValueCallback */ null); ////// Reads the attached property CacheInvalidationThresholdMinimum from the given object. /// [AttachedPropertyBrowsableForType(typeof(TileBrush))] public static double GetCacheInvalidationThresholdMinimum(DependencyObject target) { if (target == null) { throw new ArgumentNullException("target"); } return (double)target.GetValue(CacheInvalidationThresholdMinimumProperty); } ////// Writes the attached property CacheInvalidationThresholdMinimum to the given object. /// public static void SetCacheInvalidationThresholdMinimum(DependencyObject target, double cacheInvalidationThresholdMinimum) { if (target == null) { throw new ArgumentNullException("target"); } target.SetValue(CacheInvalidationThresholdMinimumProperty, cacheInvalidationThresholdMinimum); } // // CacheInvalidationThresholdMaximum // ////// CacheInvalidationThresholdMaximum - /// public static readonly DependencyProperty CacheInvalidationThresholdMaximumProperty = DependencyProperty.RegisterAttached("CacheInvalidationThresholdMaximum", typeof(double), typeof(RenderOptions), new UIPropertyMetadata(1.414), /* ValidateValueCallback */ null); ////// Reads the attached property CacheInvalidationThresholdMaximum from the given object. /// [AttachedPropertyBrowsableForType(typeof(TileBrush))] public static double GetCacheInvalidationThresholdMaximum(DependencyObject target) { if (target == null) { throw new ArgumentNullException("target"); } return (double)target.GetValue(CacheInvalidationThresholdMaximumProperty); } ////// Writes the attached property CacheInvalidationThresholdMaximum to the given object. /// public static void SetCacheInvalidationThresholdMaximum(DependencyObject target, double cacheInvalidationThresholdMaximum) { if (target == null) { throw new ArgumentNullException("target"); } target.SetValue(CacheInvalidationThresholdMaximumProperty, cacheInvalidationThresholdMaximum); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // The RenderOptions class provides definitions of attached properties // which will control rendering. // //----------------------------------------------------------------------------- using System; using System.Diagnostics; namespace System.Windows.Media { ////// RenderOptions - /// The RenderOptions class provides definitions of attached properties /// which will control rendering. /// public static class RenderOptions { // // EdgeMode // ////// EdgeModeProperty - Enum which descibes the manner in which we render edges of non-text primitives. /// public static readonly DependencyProperty EdgeModeProperty = DependencyProperty.RegisterAttached("EdgeMode", typeof(EdgeMode), typeof(RenderOptions), new UIPropertyMetadata(EdgeMode.Unspecified), new ValidateValueCallback(System.Windows.Media.ValidateEnums.IsEdgeModeValid)); ////// Reads the attached property EdgeMode from the given object. /// [AttachedPropertyBrowsableForType(typeof(DependencyObject))] public static EdgeMode GetEdgeMode(DependencyObject target) { if (target == null) { throw new ArgumentNullException("target"); } return (EdgeMode)target.GetValue(EdgeModeProperty); } ////// Writes the attached property EdgeMode to the given object. /// public static void SetEdgeMode(DependencyObject target, EdgeMode edgeMode) { if (target == null) { throw new ArgumentNullException("target"); } target.SetValue(EdgeModeProperty, edgeMode); } // // BitmapScaling // ////// BitmapScalingModeProperty - Enum which descibes the manner in which we scale the images. /// public static readonly DependencyProperty BitmapScalingModeProperty = DependencyProperty.RegisterAttached("BitmapScalingMode", typeof(BitmapScalingMode), typeof(RenderOptions), new UIPropertyMetadata(BitmapScalingMode.Unspecified), new ValidateValueCallback(System.Windows.Media.ValidateEnums.IsBitmapScalingModeValid)); ////// Reads the attached property BitmapScalingMode from the given object. /// [AttachedPropertyBrowsableForType(typeof(DependencyObject))] public static BitmapScalingMode GetBitmapScalingMode(DependencyObject target) { if (target == null) { throw new ArgumentNullException("target"); } return (BitmapScalingMode)target.GetValue(BitmapScalingModeProperty); } ////// Writes the attached property BitmapScalingMode to the given object. /// public static void SetBitmapScalingMode(DependencyObject target, BitmapScalingMode bitmapScalingMode) { if (target == null) { throw new ArgumentNullException("target"); } target.SetValue(BitmapScalingModeProperty, bitmapScalingMode); } // // CachingHint // ////// CachingHintProperty - Hints the rendering engine that rendered content should be cached /// when possible. This is currently supported on TileBrush. /// public static readonly DependencyProperty CachingHintProperty = DependencyProperty.RegisterAttached("CachingHint", typeof(CachingHint), typeof(RenderOptions), new UIPropertyMetadata(CachingHint.Unspecified), new ValidateValueCallback(System.Windows.Media.ValidateEnums.IsCachingHintValid)); ////// Reads the attached property CachingHint from the given object. /// [AttachedPropertyBrowsableForType(typeof(TileBrush))] public static CachingHint GetCachingHint(DependencyObject target) { if (target == null) { throw new ArgumentNullException("target"); } return (CachingHint)target.GetValue(CachingHintProperty); } ////// Writes the attached property CachingHint to the given object. /// public static void SetCachingHint(DependencyObject target, CachingHint cachingHint) { if (target == null) { throw new ArgumentNullException("target"); } target.SetValue(CachingHintProperty, cachingHint); } // // CacheInvalidationThresholdMinimum // ////// CacheInvalidationThresholdMinimum - /// public static readonly DependencyProperty CacheInvalidationThresholdMinimumProperty = DependencyProperty.RegisterAttached("CacheInvalidationThresholdMinimum", typeof(double), typeof(RenderOptions), new UIPropertyMetadata(0.707), /* ValidateValueCallback */ null); ////// Reads the attached property CacheInvalidationThresholdMinimum from the given object. /// [AttachedPropertyBrowsableForType(typeof(TileBrush))] public static double GetCacheInvalidationThresholdMinimum(DependencyObject target) { if (target == null) { throw new ArgumentNullException("target"); } return (double)target.GetValue(CacheInvalidationThresholdMinimumProperty); } ////// Writes the attached property CacheInvalidationThresholdMinimum to the given object. /// public static void SetCacheInvalidationThresholdMinimum(DependencyObject target, double cacheInvalidationThresholdMinimum) { if (target == null) { throw new ArgumentNullException("target"); } target.SetValue(CacheInvalidationThresholdMinimumProperty, cacheInvalidationThresholdMinimum); } // // CacheInvalidationThresholdMaximum // ////// CacheInvalidationThresholdMaximum - /// public static readonly DependencyProperty CacheInvalidationThresholdMaximumProperty = DependencyProperty.RegisterAttached("CacheInvalidationThresholdMaximum", typeof(double), typeof(RenderOptions), new UIPropertyMetadata(1.414), /* ValidateValueCallback */ null); ////// Reads the attached property CacheInvalidationThresholdMaximum from the given object. /// [AttachedPropertyBrowsableForType(typeof(TileBrush))] public static double GetCacheInvalidationThresholdMaximum(DependencyObject target) { if (target == null) { throw new ArgumentNullException("target"); } return (double)target.GetValue(CacheInvalidationThresholdMaximumProperty); } ////// Writes the attached property CacheInvalidationThresholdMaximum to the given object. /// public static void SetCacheInvalidationThresholdMaximum(DependencyObject target, double cacheInvalidationThresholdMaximum) { if (target == null) { throw new ArgumentNullException("target"); } target.SetValue(CacheInvalidationThresholdMaximumProperty, cacheInvalidationThresholdMaximum); } } } // 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
- ImageInfo.cs
- ConnectionPoolManager.cs
- AncestorChangedEventArgs.cs
- StyleModeStack.cs
- TextUtf8RawTextWriter.cs
- DataColumnMapping.cs
- COM2ExtendedBrowsingHandler.cs
- SelectionPattern.cs
- ResolveCriteria.cs
- GeneralTransform3DCollection.cs
- TrackingAnnotationCollection.cs
- COAUTHIDENTITY.cs
- ClaimTypes.cs
- HttpRequestMessageProperty.cs
- EventToken.cs
- HyperLinkStyle.cs
- RequestQueue.cs
- EpmSourceTree.cs
- X509Certificate.cs
- SmtpLoginAuthenticationModule.cs
- PolyLineSegment.cs
- BinaryUtilClasses.cs
- Sentence.cs
- DataSourceViewSchemaConverter.cs
- HttpCacheParams.cs
- BackEase.cs
- UnsafeNetInfoNativeMethods.cs
- ColorComboBox.cs
- AttributeProviderAttribute.cs
- EntitySqlQueryCacheKey.cs
- BamlResourceSerializer.cs
- newinstructionaction.cs
- RuntimeCompatibilityAttribute.cs
- ToolStripRenderEventArgs.cs
- ExpressionVisitorHelpers.cs
- HttpWebRequestElement.cs
- ActiveXHost.cs
- MetafileHeader.cs
- SafeWaitHandle.cs
- InvalidFilterCriteriaException.cs
- StringPropertyBuilder.cs
- DockingAttribute.cs
- TextEditorSpelling.cs
- SqlCacheDependency.cs
- BasicExpressionVisitor.cs
- NullableDecimalMinMaxAggregationOperator.cs
- KnownTypeAttribute.cs
- MarkerProperties.cs
- PointConverter.cs
- OraclePermissionAttribute.cs
- SqlClientWrapperSmiStreamChars.cs
- ACE.cs
- RepeatButton.cs
- CorrelationKeyCalculator.cs
- SmtpMail.cs
- Evaluator.cs
- BatchParser.cs
- EncodingTable.cs
- TypeDelegator.cs
- Helper.cs
- XPathEmptyIterator.cs
- UIElementParagraph.cs
- QilReplaceVisitor.cs
- RepeatInfo.cs
- SchemaReference.cs
- FunctionQuery.cs
- DetailsViewCommandEventArgs.cs
- ASCIIEncoding.cs
- XamlPointCollectionSerializer.cs
- LexicalChunk.cs
- CompilerLocalReference.cs
- wgx_commands.cs
- CompensationDesigner.cs
- InputScopeAttribute.cs
- SerTrace.cs
- ToolStripSettings.cs
- ExtensionFile.cs
- TransformedBitmap.cs
- WebControlToolBoxItem.cs
- SplitterPanel.cs
- PowerModeChangedEventArgs.cs
- Label.cs
- SqlResolver.cs
- ISAPIApplicationHost.cs
- StructuredTypeInfo.cs
- COM2PropertyBuilderUITypeEditor.cs
- HttpProfileBase.cs
- WindowsSspiNegotiation.cs
- AttributeEmitter.cs
- DataGridTextBox.cs
- XmlWellformedWriter.cs
- UIElement3D.cs
- TraceSection.cs
- TabControl.cs
- SqlParameter.cs
- securitycriticaldataClass.cs
- ImpersonationContext.cs
- AppearanceEditorPart.cs
- ManagementClass.cs
- MarkupObject.cs