-
Notifications
You must be signed in to change notification settings - Fork 79
docs(DockManager): Add missing UnpinnedChanged event #3184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -16,6 +16,7 @@ This article explains the events available in the Telerik DockManager for Blazor | |||||
* [OnUndock](#ondock) | ||||||
* [VisibleChanged](#visiblechanged) | ||||||
* [SizeChanged](#sizechanged) | ||||||
* [UnpinnedChanged](#unpinnedchanged) | ||||||
* [UnpinnedSizeChanged](#unpinnedsizechanged) | ||||||
* [OnPaneResize](#onpaneresize) | ||||||
* [State Events](#state-events) | ||||||
|
@@ -24,7 +25,7 @@ This article explains the events available in the Telerik DockManager for Blazor | |||||
|
||||||
## OnDock | ||||||
|
||||||
The `OnDock` event is fired when any pane is docked. | ||||||
The `OnDock` event fires when any pane is docked. | ||||||
|
||||||
The event handler receives as an argument an `DockManagerDockEventArgs` object that contains: | ||||||
|
||||||
|
@@ -37,7 +38,7 @@ The event handler receives as an argument an `DockManagerDockEventArgs` object t | |||||
|
||||||
## OnUndock | ||||||
|
||||||
The `OnUndock` event is fired when any pane is undocked. | ||||||
The `OnUndock` event fires when any pane is undocked. | ||||||
|
||||||
The event handler receives as an argument an `DockManagerUndockEventArgs` object that contains: | ||||||
|
||||||
|
@@ -48,19 +49,23 @@ The event handler receives as an argument an `DockManagerUndockEventArgs` object | |||||
|
||||||
## VisibleChanged | ||||||
|
||||||
The `VisibleChanged` event is fired when the user tries to hide a given pane. You can effectively cancel the event by not propagating the new visibility state to the variable the `Visible` property is bound to. This is the way to cancel the event and keep the pane visible. | ||||||
The `VisibleChanged` event fires when the user tries to hide a given pane. You can effectively cancel the event by not propagating the new visibility state to the variable the `Visible` property is bound to. This is the way to cancel the event and keep the pane visible. | ||||||
|
||||||
## SizeChanged | ||||||
|
||||||
The `SizeChanged` event is triggered when the `Size` parameter of the corresponding pane is changed. | ||||||
The `SizeChanged` event fireswhen the `Size` parameter of the corresponding pane changes. | ||||||
|
||||||
## UnpinnedChanged | ||||||
|
||||||
The `UnpinnedChanged` event fireswhen the `Unpinned` parameter of the corresponding pane changes. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
## UnpinnedSizeChanged | ||||||
|
||||||
The `UnpinnedSizeChanged` event is triggered when the `UnpinnedSize` parameter of the corresponding pane is changed. | ||||||
The `UnpinnedSizeChanged` event fires when the `UnpinnedSize` parameter of the corresponding pane changes. | ||||||
|
||||||
## OnPaneResize | ||||||
|
||||||
The `OnPaneResize` event is fired when a pane is resized, except unpinned panes. It lets you respond to that change if needed - for example, call the `.Refresh()` method of a chart or otherwise repaint a child component in the content. You can also use it to, for example, update the saved [state](slug:dockmanager-state) for your users. | ||||||
The `OnPaneResize` event fires when a pane is resized, except unpinned panes. It lets you respond to that change if needed - for example, call the `.Refresh()` method of a chart or otherwise repaint a child component in the content. You can also use it to, for example, update the saved [state](slug:dockmanager-state) for your users. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The first sentence sounds very unclear. I recommend revising it for clarity and better readability. |
||||||
|
||||||
The event handler receives as an argument an `DockManagerPaneResizeEventArgs` object that contains: | ||||||
|
||||||
|
@@ -81,7 +86,7 @@ Review the [DockManager state](slug:dockmanager-state) article for more details | |||||
|
||||||
## OnPin | ||||||
|
||||||
The `OnPin` event is fired when any pane is pinned. | ||||||
The `OnPin` event fires when any pane is pinned. | ||||||
|
||||||
The event handler receives as an argument an `DockManagerPinEventArgs` object that contains: | ||||||
|
||||||
|
@@ -92,7 +97,7 @@ The event handler receives as an argument an `DockManagerPinEventArgs` object th | |||||
|
||||||
## OnUnpin | ||||||
|
||||||
The `OnUnpin` event is fired when any pane is unpinned. | ||||||
The `OnUnpin` event fires when any pane is unpinned. | ||||||
|
||||||
The event handler receives as an argument an `DockManagerUnpinEventArgs` object that contains: | ||||||
|
||||||
|
@@ -124,13 +129,17 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object | |||||
<DockManagerContentPane HeaderText="Pane 1" | ||||||
Id="Pane1" | ||||||
Size="50%" | ||||||
Unpinned="@Pane1Unpinned" | ||||||
UnpinnedChanged="@Pane1UnpinnedChanged" | ||||||
UnpinnedSize="@Pane1UnpinnedSize" | ||||||
UnpinnedSizeChanged="@Pane1UnpinnedSizeChanged" | ||||||
Closeable="false"> | ||||||
<Content> | ||||||
Pane 1. Undocking is allowed. Docking over it is cancelled. | ||||||
<code>UnpinnedSizeChanged</code> is handled. | ||||||
Current <code>UnpinnedSize</code>: <strong>@Pane1UnpinnedSize</strong> | ||||||
<code>UnpinnedChanged</code> and <code>UnpinnedSizeChanged</code> are handled. | ||||||
Current | ||||||
<code>UnpinnedSize</code>: | ||||||
<strong>@Pane1UnpinnedSize</strong> | ||||||
</Content> | ||||||
</DockManagerContentPane> | ||||||
|
||||||
|
@@ -206,6 +215,7 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object | |||||
@code { | ||||||
private TelerikDockManager? DockManagerRef { get; set; } | ||||||
|
||||||
private bool Pane1Unpinned { get; set; } | ||||||
private string Pane1UnpinnedSize { get; set; } = "360px"; | ||||||
private bool Pane4Visible { get; set; } = true; | ||||||
private bool FloatingPaneVisible { get; set; } = true; | ||||||
|
@@ -247,7 +257,7 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object | |||||
} | ||||||
else | ||||||
{ | ||||||
DockManagetEventLog.Insert(0, $"Pane <strong>{args.PaneId}</strong> was pinned."); | ||||||
DockManagetEventLog.Insert(0, $"[DockManager OnPanePin] Pane <strong>{args.PaneId}</strong> was pinned."); | ||||||
} | ||||||
} | ||||||
|
||||||
|
@@ -256,6 +266,13 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object | |||||
DockManagetEventLog.Insert(0, $"Pane <strong>{args.PaneId}</strong> was resized to {args.Size}."); | ||||||
} | ||||||
|
||||||
private void Pane1UnpinnedChanged(bool newUnpinned) | ||||||
{ | ||||||
Pane1Unpinned = newUnpinned; | ||||||
|
||||||
DockManagetEventLog.Insert(0, $"[Pane UnpinnedChanged] Pane <strong>Pane 1</strong> was {(newUnpinned ? "unpinned" : "pinned")}."); | ||||||
} | ||||||
|
||||||
private void Pane1UnpinnedSizeChanged(string newUnpinnedSize) | ||||||
{ | ||||||
Pane1UnpinnedSize = newUnpinnedSize; | ||||||
|
@@ -272,7 +289,7 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object | |||||
} | ||||||
else | ||||||
{ | ||||||
DockManagetEventLog.Insert(0, $"Pane <strong>{args.PaneId}</strong> was unpinned."); | ||||||
DockManagetEventLog.Insert(0, $"[DockManager OnUnpin] Pane <strong>{args.PaneId}</strong> was unpinned."); | ||||||
} | ||||||
} | ||||||
|
||||||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.