Class TwCalendarEventDialog<T>
- Namespace
- TwBlazor.Components
- Assembly
- TwBlazor.dll
The built-in create/edit/view dialog opened by TwCalendar<T> when an event is added
or clicked. Edits a working copy of Schedule<T>'s Name/Start/End directly; any
T-specific fields are rendered via the optional
EventDialogContent template instead, since this dialog has no way to
build a generic edit form for an arbitrary T.
public class TwCalendarEventDialog<T> : TwBlazorComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ITwComponent
Type Parameters
TThe type of Value for the event being edited.
- Inheritance
-
TwCalendarEventDialog<T>
- Implements
- Inherited Members
Constructors
TwCalendarEventDialog()
public TwCalendarEventDialog()
Properties
ContentTemplate
Optional extra fields rendered below Start/End, for T-specific data -
see EventDialogContent.
[Parameter]
public RenderFragment<Schedule<T>>? ContentTemplate { get; set; }
Property Value
Fields
The properties of Value to show (read-only mode) or edit, resolved from DialogProperties. They render after the built-in fields and before ContentTemplate.
[Parameter]
public IReadOnlyList<TwCalendarDialogField> Fields { get; set; }
Property Value
IsNew
Whether WorkingEvent is a brand-new event (hides the Delete button) as opposed to an existing one being edited.
[Parameter]
public bool IsNew { get; set; }
Property Value
ReadOnly
When true, every field renders read-only and only a "Close" button is shown.
[Parameter]
public bool ReadOnly { get; set; }
Property Value
WorkingEvent
The event being created or edited. A working copy - mutated in place by this dialog's fields
and (for reference-type T) by ContentTemplate - and only
handed back to the caller on TwBlazor.Components.TwCalendarEventDialog`1.Save.
[Parameter]
[EditorRequired]
public Schedule<T> WorkingEvent { get; set; }
Property Value
- Schedule<T>
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder