Skip to content

Commit be2b19f

Browse files
committed
Add sample
1 parent 47d8444 commit be2b19f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

samples/BehaviorsTestApplication/Views/MainWindow.axaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@
44
xmlns:vm="using:BehaviorsTestApplication.ViewModels"
55
xmlns:views="using:BehaviorsTestApplication.Views"
66
Title="XamlBehaviors Test Application" Width="1000" Height="700"
7-
x:DataType="vm:MainWindowViewModel"
8-
x:CompileBindings="False">
7+
x:DataType="vm:MainWindowViewModel">
98
<Interaction.Behaviors>
9+
<!-- TopLevel Logical tree special case -->
10+
<!--
1011
<EventTriggerBehavior EventName="Opened">
1112
<InvokeCommandAction Command="{Binding InitializeCommand, Mode=OneTime}" />
1213
</EventTriggerBehavior>
14+
-->
15+
<!-- TopLevel attached to visual tree special case -->
16+
<RoutedEventTriggerBehavior RoutedEvent="{x:Static Control.LoadedEvent}">
17+
<InvokeCommandAction Command="{Binding InitializeCommand, Mode=OneTime}" />
18+
</RoutedEventTriggerBehavior>
1319
</Interaction.Behaviors>
1420
<views:MainView />
1521
</Window>

0 commit comments

Comments
 (0)