Postlagerkarte / blazor-dragdrop

Easy-to-use Drag and Drop Library for Blazor
MIT License
399 stars 96 forks source link

Using in Blazor Templates #141

Open HybridSolutions opened 2 years ago

HybridSolutions commented 2 years ago

Hi, I have a question about a specific usage.

I have a component that works as a page template and would like to define Dropzones in it so that the user could drag UI components into those zones or choose a zone name from a Dropdownlist and add a component to it without drag & drop. The issue is that I need to know which zones are available in that template by name so that I can populate the dropdownlist dynamically. Each template can have different Dropzones defined.

Is this possible with blazor-dragdrop? My template would look like this:

@* This is a razor component used like a page template *@
    @inject NavigationManager NavigationManager

    <div class="container">
      <div class="row">
        <div class="col-sm-12">
          <Dropzone name="HeaderContent"></Dropzone>
        </div>
      </div>
      <div class="row">
        <div class="col-sm-12">
          <Dropzone name="MainContent"></Dropzone>
        </div>
      </div>
    </div>

Thank you in advance!