Esempio n. 1
0
 protected override async Task OnAfterRenderAsync(bool firstRender)
 {
     if (firstRender)
     {
         await MediaQueryList.Initialize(this);
     }
 }
Esempio n. 2
0
 public async ValueTask DisposeAsync()
 {
     if (MediaQueryList == null)
     {
         return;
     }
     await MediaQueryList.RemoveQuery(this);
 }
Esempio n. 3
0
 protected override void OnInitialized()
 {
     if (MediaQueryList == null)
     {
         throw new Exception("MediaQueryList is null. The MediaQueryList component should be added to the root or MainLayout of your applicaiton.");
     }
     else
     {
         MediaQueryList.AddQuery(this);
     }
 }
Esempio n. 4
0
 public void Dispose()
 {
     MediaQueryList.RemoveQuery(this);
 }
Esempio n. 5
0
 public async ValueTask DisposeAsync()
 {
     await MediaQueryList.RemoveQuery(this);
 }