Silverlight中标准的,没有样式的按钮。它住在ChildWindow。
当光标仍在移动时,我点击按钮但事件不会触发。
我确信第一次点击发生在按钮内部,鼠标也在内部释放。该图说明了我第一次点击的位置以及我最终的位置。我不是在拖动,而是尽快释放鼠标按钮。
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid x:Name="MainContent" Grid.Row="0">
<!-- MainContent here -->
</Grid>
<Grid Grid.Row="1">
<ContentControl Style="{StaticResource ContainerStyle}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button
Grid.Column="2"
VerticalAlignment="Stretch"
VerticalContentAlignment="Stretch"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Command="{Binding CancelCommand}"
Click="CancelButton_Click" />
<Button
Grid.Column="1"
VerticalAlignment="Stretch"
VerticalContentAlignment="Stretch"
HorizontalAlignment="Stretch"
Width="{StaticResource CenterButtonWidth}"
Command="{Binding SaveCommand}"
CommandParameter="false" />
<Button
Grid.Column="0"
VerticalAlignment="Stretch"
VerticalContentAlignment="Stretch"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Style="{StaticResource ButtonTwoToneStyle2}"
Command="{Binding SaveCommand}"
CommandParameter="true" />
</Grid>
</ContentControl>
</Grid>
</Grid>