Class SplitterEvents
Configure the event handlers to handle the events with Splitter component.
Inheritance
Namespace: Syncfusion.Blazor.Layouts
Assembly: Syncfusion.Blazor.dll
Syntax
public class SplitterEvents : ComponentBase
Constructors
SplitterEvents()
Declaration
public SplitterEvents()
Properties
Collapsed
Gets or sets the event callback that will be invoked when the panes get collapsed.
Declaration
public EventCallback<ExpandedEventArgs> Collapsed { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<ExpandedEventArgs> |
Examples
<SfSplitter Height="240px" Width="100%">
<SplitterEvents OnExpand="@CollapseHandler" />
<SplitterPanes>
<SplitterPane Collapsible=true>
<ContentTemplate>
<div> Left Pane</div>
</ContentTemplate>
</SplitterPane>
<SplitterPane Collapsible=true>
<ContentTemplate>
<div> Right Pane</div>
</ContentTemplate>
</SplitterPane>
</SplitterPanes>
</SfSplitter>
@code{
private void CollapseHandler(ExpandedEventArgs args)
{
// Perform additional logic
}
}
Created
Gets or sets the event callback that will be invoked when the component is created.
Declaration
public EventCallback<object> Created { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Destroyed
Gets or sets the event callback that will be invoked when the splitter is destroyed with its elements.
Declaration
public EventCallback<object> Destroyed { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> |
Expanded
Gets or sets the event callback that will be invoked when the panes get expanded.
Declaration
public EventCallback<ExpandedEventArgs> Expanded { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<ExpandedEventArgs> |
Examples
<SfSplitter Height="240px" Width="100%">
<SplitterEvents Expanded="@ExpandedHandler" />
<SplitterPanes>
<SplitterPane Collapsible=true>
<ContentTemplate>
<div> Left Pane</div>
</ContentTemplate>
</SplitterPane>
<SplitterPane Collapsible=true>
<ContentTemplate>
<div> Right Pane</div>
</ContentTemplate>
</SplitterPane>
</SplitterPanes>
</SfSplitter>
@code{
private void ExpandedHandler(ExpandedEventArgs args)
{
// Perform additional logic
}
}
OnCollapse
Gets or sets the event callback that will be invoked on the pane collapse action.
Declaration
public EventCallback<BeforeExpandEventArgs> OnCollapse { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<BeforeExpandEventArgs> |
Examples
<SfSplitter Height="240px" Width="100%">
<SplitterEvents OnCollapse="@OnCollapseHandler" />
<SplitterPanes>
<SplitterPane Collapsible=true>
<ContentTemplate>
<div> Left Pane</div>
</ContentTemplate>
</SplitterPane>
<SplitterPane Collapsible=true>
<ContentTemplate>
<div> Right Pane</div>
</ContentTemplate>
</SplitterPane>
</SplitterPanes>
</SfSplitter>
@code{
private void OnCollapseHandler(BeforeExpandEventArgs args)
{
if (someCondition)
{
args.Cancel = true; // Cancel the collapse operation if needed
}
else
{
// Perform additional logic
}
}
}
OnExpand
Gets or sets the event callback that will be invoked on expanding the panes.
Declaration
public EventCallback<BeforeExpandEventArgs> OnExpand { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<BeforeExpandEventArgs> |
Examples
<SfSplitter Height="240px" Width="100%">
<SplitterEvents OnExpand="@OnExpandeHandler" />
<SplitterPanes>
<SplitterPane Collapsible=true>
<ContentTemplate>
<div> Left Pane</div>
</ContentTemplate>
</SplitterPane>
<SplitterPane Collapsible=true>
<ContentTemplate>
<div> Right Pane</div>
</ContentTemplate>
</SplitterPane>
</SplitterPanes>
</SfSplitter>
@code{
private void OnExpandeHandler(BeforeExpandEventArgs args)
{
if (someCondition)
{
args.Cancel = true; // Cancel the collapse operation if needed
}
else
{
// Perform additional logic
}
}
}
OnResizeStart
Gets or sets the event callback that will be invoked when the split pane is started to resize.
Declaration
public EventCallback<ResizeEventArgs> OnResizeStart { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<ResizeEventArgs> |
Examples
<SfSplitter Height="240px" Width="100%">
<SplitterEvents OnResizeStart="@OnResizeHandler" />
<SplitterPanes>
<SplitterPane>
<ContentTemplate>
<div> Left Pane</div>
</ContentTemplate>
</SplitterPane>
<SplitterPane>
<ContentTemplate>
<div> Right Pane</div>
</ContentTemplate>
</SplitterPane>
</SplitterPanes>
</SfSplitter>
@code{
private void OnResizeHandler(ResizeEventArgs args)
{
args.Cancel = true; // Perform additional logic
}
}
OnResizeStop
Gets or sets the event callback that will be invoked when the resizing of split pane is stopped.
Declaration
public EventCallback<ResizingEventArgs> OnResizeStop { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<ResizingEventArgs> |
Parent
The splitter is a layout user interface (UI) component that splits the layout into multiple panes with resizable and collapsible support.
Declaration
protected SfSplitter Parent { get; set; }
Property Value
Type |
---|
SfSplitter |
Resizing
Gets or sets the event callback that will be invoked when a split pane is being resized.
Declaration
public EventCallback<ResizingEventArgs> Resizing { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<ResizingEventArgs> |
Methods
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |