예제 #1
0
 protected override async Task OnAfterRenderAsync(bool firstRender)
 {
     if (firstRender)
     {
         await MediaQueryList.Initialize(this);
     }
 }
예제 #2
0
 public async ValueTask DisposeAsync()
 {
     if (MediaQueryList == null)
     {
         return;
     }
     await MediaQueryList.RemoveQuery(this);
 }
예제 #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);
     }
 }
예제 #4
0
 public void Dispose()
 {
     MediaQueryList.RemoveQuery(this);
 }
예제 #5
0
 public async ValueTask DisposeAsync()
 {
     await MediaQueryList.RemoveQuery(this);
 }