使用 Caliburn 和 Silverlight,我发现如果我这样做:
<Button PresentationFramework:Message.Attach="ContainerCommand InstructorProfileCommand()"
Height="60"
Content="Instructor" />
然后它工作并调用 InstructorProfileCommand.Execute() 方法。但是,如果我这样做:
<Button Height="60" >
<Grid PresentationFramework:Message.Attach="ContainerCommand InstructorProfileCommand()">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image Source="/App.Module;Component/Icons/navigate.jpg"
Height="50"
Width="50" />
<TextBlock Text="Instructor Profile"
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,0,0,0" />
</Grid>
</Button>
Execute() 命令不会被触发。附加的财产是否在正确的地方才能发挥作用?
京东