();
-//services.AddResizeListener(options =>
-// {
-// options.ReportRate = 300;
-// options.EnableLogging = true;
-// options.SuppressInitEvent = true;
-// });
-```
-
-### Usage
-
-This example shows how to get the browsers width/height and check for media query matches. Depending on the matched media query the view can toggle between two components WeatherGrid or WeatherCards.
-
-```razor
-@inject ResizeListener listener
-@implements IDisposable
-@page "/fetchdata"
-
-@using BlazorSize.Example.Data
-@inject WeatherForecastService ForecastService
-
-Weather forecast
-
-This component demonstrates adaptive rendering of a Blazor UI.
-
-Height: @browser.Height
-Width: @browser.Width
-MQ: @IsSmallMedia
-
-@if (IsSmallMedia)
-{
-
-
-}
-else
-{
-
-
-}
-
-@code {
- WeatherForecast[] forecasts;
-
- // We can also capture the browser's width / height if needed. We hold the value here.
- BrowserWindowSize browser = new BrowserWindowSize();
-
- bool IsSmallMedia = false;
-
- protected override async Task OnInitializedAsync()
- {
- forecasts = await ForecastService.GetForecastAsync(DateTime.Now);
- }
-
- protected override void OnAfterRender(bool firstRender)
- {
-
- if (firstRender)
- {
- // Subscribe to the OnResized event. This will do work when the browser is resized.
- listener.OnResized += WindowResized;
- }
- }
-
- void IDisposable.Dispose()
- {
- // Always use IDisposable in your component to unsubscribe from the event.
- // Be a good citizen and leave things how you found them.
- // This way event handlers aren't called when nobody is listening.
- listener.OnResized -= WindowResized;
- }
-
- // This method will be called when the window resizes.
- // It is ONLY called when the user stops dragging the window's edge. (It is already throttled to protect your app from perf. nightmares)
- async void WindowResized(object _, BrowserWindowSize window)
- {
- // Get the browsers's width / height
- browser = window;
-
- // Check a media query to see if it was matched. We can do this at any time, but it's best to check on each resize
- IsSmallMedia = await listener.MatchMedia(Breakpoints.SmallDown);
-
- // We're outside of the component's lifecycle, be sure to let it know it has to re-render.
- StateHasChanged();
- }
-
-}
-```
-## Reference the JavaScript interop
-
-**This is only needed for .NET 3.2 or below**
-
-Add the JavaScript interop to your application's index.html or _hosts.cshtml
-```html
-
-
-```
\ No newline at end of file
+[For documentation please refer to the Wiki section of this GitHub repo.](https://github.com/EdCharbeneau/BlazorSize/wiki)
\ No newline at end of file