0
허브 제어에서 SectionsInViewChanged 이벤트에 MVVM Light, Relay 명령을 바인드 할 수 있습니까?MVVM 라이트 허브 제어 섹션 InViewChanged RelayCommand
허브 제어에서 SectionsInViewChanged 이벤트에 MVVM Light, Relay 명령을 바인드 할 수 있습니까?MVVM 라이트 허브 제어 섹션 InViewChanged RelayCommand
새 허브 컨트롤을 사용하지 않았지만 다른 허브 컨트롤과 동일해야합니다. EventToCommand를 사용하여 RelayCommands를 이벤트에 바인딩 할 수 있습니다. http://msdn.microsoft.com/en-us/magazine/dn237302.aspx을 읽으십시오. LoadedCommand 소성 결합이 사용자 제어로드 이벤트를 도시
니펫
<UserControl x:Class="Bill.Views.Setup.AdjustmentReasonsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF45"
xmlns:igDP="http://infragistics.com/DataPresenter"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300"
>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Loaded">
<cmd:EventToCommand Command="{Binding Mode=OneWay, Path=LoadedCommand}" PassEventArgsToCommand="True" />
</i:EventTrigger>
</i:Interaction.Triggers>
. . .