Skip to content

Commit 726c100

Browse files
committed
update ToolBarAdv-state.md
1 parent a00f0a4 commit 726c100

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

wpf/ToolBar/ToolBarAdv-state.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,74 @@ toolBarManager.CanDockAtTop = false;
189189
{% endhighlight %}
190190

191191
{% endtabs%}
192+
193+
## Implementation of toolbar state changed event to detect when the state of ToolBarAdv changes.
194+
195+
Introducing a state changed event in the ToolbarAdv control that notifies users whenever the toolbar's state changes, including transitions between Docked, Floating, and Hidden states.
196+
197+
{% tabs %}
198+
199+
{% highlight XAML %}
200+
201+
<syncfusion:ToolBarManager x:Name="toolBarManager" Grid.Row="0" Height="83">
202+
203+
<syncfusion:ToolBarManager.TopToolBarTray>
204+
205+
<syncfusion:ToolBarTrayAdv VerticalAlignment="Top">
206+
207+
<syncfusion:ToolBarAdv x:Name="toolbar" ToolBarStateChanged="ToolBarAdv_ToolBarStateChanged1" Height="40" EnableAddRemoveButton="True">
208+
209+
<Button syncfusion:ToolBarAdv.Label="Open Folder" Height="40" Width="40" ToolTip="Open Folder" Margin="5,0,5,0">
210+
211+
<Image Source="C:\OpenFolder.png" Stretch="Uniform"/>
212+
213+
</Button>
214+
215+
<Button syncfusion:ToolBarAdv.Label="Save" Height="40" Width="40" ToolTip="Save" Margin="5,0,5,0">
216+
217+
<Image Source="C:\Save.JPG" Stretch="Uniform"/>
218+
219+
</Button>
220+
221+
<Button syncfusion:ToolBarAdv.Label="Cut" Height="40" Width="40" ToolTip="Cut" Margin="5,0,5,0">
222+
223+
<Image Source="C:\Cut.jpg" Stretch="Fill"/>
224+
225+
</Button>
226+
227+
<Button syncfusion:ToolBarAdv.Label="Copy" Height="40" Width="40" ToolTip="Copy" Margin="5,0,5,0">
228+
229+
<Image Source="C:\Copy.png" Stretch="Uniform"/>
230+
231+
</Button>
232+
233+
<Button syncfusion:ToolBarAdv.Label="Paste" Height="40" Width="40" ToolTip="Paste" Margin="5,0,5,0">
234+
235+
<Image Source="C:\Paste.jpg" Stretch="Uniform"/>
236+
237+
</Button>
238+
239+
</syncfusion:ToolBarAdv>
240+
241+
</syncfusion:ToolBarTrayAdv>
242+
243+
</syncfusion:ToolBarManager.TopToolBarTray>
244+
245+
</syncfusion:ToolBarManager>
246+
247+
248+
249+
{% endhighlight %}
250+
251+
{% highlight C# %}
252+
253+
ToolBarAdv toolbar = new ToolBarAdv();
254+
255+
toolbar.ToolBarStateChanged += ToolBarAdv_ToolBarStateChanged;
256+
257+
258+
259+
{% endhighlight %}
260+
261+
{% endtabs%}
262+

0 commit comments

Comments
 (0)