Caliburn과 Silverlight를 사용하면 다음과 같은 결과가 나타났습니다.단추 내용이 변경되면 Caliburn 명령이 작동하지 않습니다.
<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() 명령이 발생하지 않습니다. 첨부 된 속성이 제대로 작동하는 올바른 위치에 있습니까?
JD
Hola Marco. 불행히도 위의 코드는로드되지 않고 XAML 파서 오류가 발생합니다. –
Grid에서 Click 이벤트가 없습니다. LeftMouseButtonUp을 사용해야합니다. – EisenbergEffect