|
|
@@ -220,11 +220,11 @@
|
|
|
HorizontalAlignment="Right"
|
|
|
Margin="0,4">
|
|
|
<Button Content="打开"
|
|
|
- Command="{Binding TurnOnCommand}"
|
|
|
+ Command="{Binding DataContext.TurnOnCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
CommandParameter="{Binding}"
|
|
|
Margin="0,0,8,0" />
|
|
|
<Button Content="关闭"
|
|
|
- Command="{Binding TurnOffCommand}"
|
|
|
+ Command="{Binding DataContext.TurnOffCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
CommandParameter="{Binding}"
|
|
|
Margin="0,0,8,0" />
|
|
|
</StackPanel>
|