alexa
menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download

    Show / Hide Table of Contents

    Class OpacityConverter

    Converts a UI element's opacity based on its parent hierarchy and tag presence.

    Inheritance
    System.Object
    OpacityConverter
    Implements
    System.Windows.Data.IValueConverter
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Tools.Controls
    Assembly: Syncfusion.Tools.Wpf.dll
    Syntax
    public class OpacityConverter : IValueConverter

    Constructors

    OpacityConverter()

    Declaration
    public OpacityConverter()

    Methods

    Convert(Object, Type, Object, CultureInfo)

    Converts a value to an opacity level based on its parent element type and tag.

    Declaration
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    Parameters
    Type Name Description
    System.Object value

    The source data being passed to the converter, expected to be a System.Windows.FrameworkElement.

    System.Type targetType

    The type of the binding target property.

    System.Object parameter

    An optional parameter to be used in the converter logic.

    System.Globalization.CultureInfo culture

    The culture to use in the converter.

    Returns
    Type Description
    System.Object

    A System.Double representing the opacity: 1 if the parent is not a RibbonBar or has a tag; 0.5 if the parent is a RibbonBar without a tag.

    ConvertBack(Object, Type, Object, CultureInfo)

    Converts a value back from the target type to the source type. This method is not implemented and will throw a System.NotImplementedException.

    Declaration
    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    Parameters
    Type Name Description
    System.Object value

    The value produced by the binding target.

    System.Type targetType

    The type to convert to.

    System.Object parameter

    An optional parameter to use in the converter logic.

    System.Globalization.CultureInfo culture

    The culture to use in the converter.

    Returns
    Type Description
    System.Object

    This method does not return a value; it always throws an exception.

    Exceptions
    Type Condition
    System.NotImplementedException

    Thrown always, as this method is not implemented.

    Implements

    System.Windows.Data.IValueConverter
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved