Search Results for

    Show / Hide Table of Contents

    FlexCelPreview Class

    A Simple replacement for PrintPreviewControl that allows you to preview even if the user has no printers installed. View the demo on Custom Preview to see how it is used.

    Syntax

    Namespace: FlexCel.Winforms

    public class FlexCelPreview: UserControl

    Constructors

    Name Description
    FlexCelPreview Creates a new instance of FlexCelPreview.

    Methods

    Name Description
    Dispose Clean up any resources being used.
    OnStartPageChanged Replace this event when creating a custom descendant of FlexCelPreview.
    OnZoomChanged Replace this event when creating a custom descendant of FlexCelPreview.
    InvalidatePreview Invalidates the preview and forces the control to reload from the document.
    When the control is a Thumbnail you cannot Invalidate it, this will be done automatically when you invalidate the main view.
    AutofitPreviewOnce Use this method to do a single autofit. If you want the preview to be in "autofit mode" so it keeps autofitting even if you resize the window, set AutofitPreview instead.
    OnMouseDown Overrides the standard mousedown event to handle it.
    ProcessCmdKey Overrides the ProcessCmdKey event.
    OnFontChanged Overrides the OnfontChanged event.
    OnResize Overrides de OnResize method.
    OnPaint Overrides the OnPaint event.

    Properties

    Name Description
    ScreenResolution Returns the screen resolution being used.
    ScreenScale This is the ScreenResoulution divided by 96. So an screen with 100% magnification (96 dpi) will have a ScreenScale of 1, while a screen with 200% magnification will have a ScreenScale of 2.
    Document Document to be Previewed.
    PageXSeparation Separation (in display units) between a page and the next. Note that if CenteredPreview is true and the preview window is bigger than the page being displayed, this value has no effect.
    CenteredPreview When true, the preview will be drawn at the middle of the window, instead of at the left. If true, then PageXSeparation is the minimum margin that the preview will have.
    PageYSeparation Separation (in display units) between a page an the next.
    EndPreviewAtLastPage When true, the preview will stop at the last page, and if you are showing more than one page at the same time you won't be able to select the last page. When false, FlexCelPreview will add enough space after the last page so all pages are selectable.
    Note that in normal cases this won't make a difference, this property only applies if zoom is so small that you can see more than one page in the preview.
    AutofitPreview Defines if the page will be automatically zoomed to fit in the preview. Note that zoom will never be less than 10% or 400%.
    If you want to autofit just once, call AutofitPreviewOnce instead.
    StartPage Page the preview is showing.
    TotalPages Number of pages displaying.
    Zoom Zoom preview.
    CacheSize The cache size in number of pages stored at 100% zoom. For larger zoom, the actual number of pages is decreased by (Zoom*Zoom)
    ShowThumbsPageNumber If true, the thumbnails will display the page number. Note that this property only affects the thumbnails, not the main preview.
    ThumbnailSmall When using this component on Thumbnail mode, set this property to another FlexCelPreview component that will hold the small Thumbnail images.
    ThumbnailLarge When using this component on Thumbnail mode, set this property to another FlexCelPreview component that will hold the large Thumbnail images.
    SmoothingMode This affects how the images are rendered on the screen. Some modes will look a little blurred but with better quality.
    Consult the .NET framework documentation on SmoothingMode for more information
    InterpolationMode This affects how the images are rendered on the screen. Some modes will look a little blurred but with better quality.
    Consult the .NET framework documentation on SmoothingMode for more information
    AutoScroll Indicates whether scrollbars appear automatically when needed.
    BackColor Background color for the preview.
    PageShadowSize Shadow size for the pages in the preview. Set it to 0 to disable shadows.
    PageShadowColor Shadow color for the pages in the preview.
    PageBorderColor Border color for the pages in the preview.
    PageBorderWidth Border width for the pages in the preview.
    PageBorderStyle Border style for the pages in the preview.
    PageNumberBgColor Background color for the page numbers in the thumbnail view.
    PageNumberSelected​BgColor Background color for the selected page number in the thumbnail view.
    PageNumberTextColor Text color for the page number in the thumbnail view.
    PageNumberSelected​Text​Color Text color for the selected page number in the thumbnail view.
    MaxPageSize Returns the maximum height and width of a page. Note that width and height might not be from the same page, this is the width of the widest page and the height of the tallest page.

    Events

    Name Description
    StartPageChanged Fires when the starting page changes.
    ZoomChanged Fires when the Zoom changes. (for example, the user uses ctrl+MouseWeel).
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com