Table of Contents

Class ResizeOptions

Namespace
MudBlazor.Services
Assembly
MudBlazor.dll

Represents options for IBrowserViewportService.

public class ResizeOptions : IEquatable<ResizeOptions>
Inheritance
ResizeOptions
Implements
Inherited Members
Extension Methods

Constructors

ResizeOptions()

public ResizeOptions()

Properties

BreakpointDefinitions

Gets or sets the breakpoint definitions, representing specific breakpoints and their associated width.

public Dictionary<Breakpoint, int>? BreakpointDefinitions { get; set; }

Property Value

Dictionary<Breakpoint, int>

A dictionary where each entry represents a breakpoint, and the corresponding int value represents the width.

Remarks

When the dictionary is null or empty, the default breakpoint definitions will be used. The default breakpoint definitions are as follows: [Breakpoint.Xxl] = 2560, [Breakpoint.Xl] = 1920, [Breakpoint.Lg] = 1280, [Breakpoint.Md] = 960, [Breakpoint.Sm] = 600, [Breakpoint.Xs] = 0.

EnableLogging

Report resize events and media queries in the browser's console. Default value is false.

public bool EnableLogging { get; set; }

Property Value

bool

NotifyOnBreakpointOnly

If true, RaiseOnResized is called only when breakpoint has changed. Default value is true.

public bool NotifyOnBreakpointOnly { get; set; }

Property Value

bool

ReportRate

Rate in milliseconds that the browsers resize() event should report a change. Setting this value too low can cause poor application performance. Default value is 100.

public int ReportRate { get; set; }

Property Value

int

Remarks

If set to 0, the resize event will report instantaneously.

SuppressInitEvent

Suppress the first OnResized that is invoked when a new event handler is added. Default value is true.

public bool SuppressInitEvent { get; set; }

Property Value

bool

Methods

Equals(ResizeOptions?)

public bool Equals(ResizeOptions? other)

Parameters

other ResizeOptions

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Operators

operator ==(ResizeOptions?, ResizeOptions?)

public static bool operator ==(ResizeOptions? left, ResizeOptions? right)

Parameters

left ResizeOptions
right ResizeOptions

Returns

bool

operator !=(ResizeOptions, ResizeOptions)

public static bool operator !=(ResizeOptions left, ResizeOptions right)

Parameters

left ResizeOptions
right ResizeOptions

Returns

bool