DevToys logo DevToys
  • Home
  • Blog
  • Documentation
  • Download
Search Results for

    Show / Hide Table of Contents

    Interface IUIImageViewer

    A component that displays an image and allows the user to perform some read-only actions on it. By default, image viewer supports BMP, GIF, JPEG, PBM, PNG, TIFF, TGA, WEBP, SVG formats.

    Inherited Members
    IUITitledElement.Title
    IUITitledElement.TitleChanged
    IUIElement.Id
    IUIElement.IsVisible
    IUIElement.IsEnabled
    IUIElement.HorizontalAlignment
    IUIElement.VerticalAlignment
    IUIElement.IsVisibleChanged
    IUIElement.IsEnabledChanged
    IUIElement.HorizontalAlignmentChanged
    IUIElement.VerticalAlignmentChanged
    Namespace: DevToys.Api
    Assembly: DevToys.Api.dll
    Syntax
    public interface IUIImageViewer : IUITitledElement, IUIElement

    Properties

    CustomActionPerFileExtensionOnSaving

    Gets the custom actions to perform when the user saves the image with a specific file extension.

    Declaration
    IReadOnlyDictionary<string, Func<FileStream, ValueTask>> CustomActionPerFileExtensionOnSaving { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, Func<FileStream, ValueTask>>

    ImageSource

    Gets the source the image to display comes from.

    Declaration
    OneOf<FileInfo, Image, SandboxedFileReader>? ImageSource { get; }
    Property Value
    Type Description
    OneOf<FileInfo, Image, SandboxedFileReader>?

    Events

    CustomActionPerFileExtensionOnSavingChanged

    Raised when CustomActionPerFileExtensionOnSaving is changed.

    Declaration
    event EventHandler? CustomActionPerFileExtensionOnSavingChanged
    Event Type
    Type Description
    EventHandler

    ImageSourceChanged

    Raised when ImageSource is changed.

    Declaration
    event EventHandler? ImageSourceChanged
    Event Type
    Type Description
    EventHandler

    Extension Methods

    GUI.AlignHorizontally<T>(T, UIHorizontalAlignment)
    GUI.AlignVertically<T>(T, UIVerticalAlignment)
    GUI.Clear(IUIImageViewer)
    GUI.Disable<T>(T)
    GUI.Enable<T>(T)
    GUI.Hide<T>(T)
    GUI.ManuallyHandleSaveAs(IUIImageViewer, string, Func<FileStream, ValueTask>)
    GUI.RemoveManuallyHandleSaveAs(IUIImageViewer, string)
    GUI.Show<T>(T)
    GUI.Title<T>(T, string?)
    GUI.WithFile(IUIImageViewer, FileInfo)
    GUI.WithImage(IUIImageViewer, Image, bool)
    GUI.WithPickedFile(IUIImageViewer, SandboxedFileReader, bool)
    LoggingExtensions.Log<T>(T)
    In this article
    DevToys logo © 2024 DevToys