ВУЗ:
Составители:
Рубрика:
124
<GridMargin="3"MouseUp="SomethingClicked">
<Grid.RowDefinitions>
<RowDefinitionHeight="Auto"></RowDefinition>
<RowDefinitionHeight="*"></RowDefinition>
<RowDefinitionHeight="Auto"></RowDefinition>
<RowDefinitionHeight="Auto"></RowDefinition>
</Grid.RowDefinitions>
<LabelMargin="5"Background="AliceBlue"BorderBrush="Black"
BorderThickness="1"MouseUp="SomethingClicked"HorizontalAlign‐
ment="Left">
<StackPanelMouseUp="SomethingClicked">
<TextBlockMargin="3"MouseUp="SomethingClicked">
Imageandpicturelabel</TextBlock>
<ImageSource="happyface.jpg"Stretch="None"
MouseUp="SomethingClicked"Image‐
Failed="Image_ImageFailed"/>
<TextBlockMargin="3"
MouseUp="SomethingClicked">
CourtesyoftheStackPanel</TextBlock>
</StackPanel>
</Label>
<ListBoxMargin="5"Name="lstMessages"Grid.Row="1"></ListBox>
<CheckBoxMargin="5"Grid.Row="2"Name="chkHandle">Handlefirst
event</CheckBox>
<ButtonClick="cmdClear_Click"Grid.Row="3"HorizontalAlign‐
ment="Right"Margin="5"Padding="3">ClearList</Button>
</Grid>
</Window>
Метод SomethingClicked() просто проверяет свойства объекта
RoutedEventArgsи добавляет сообщение в окно списка:
protectedinteventCounter=0;
privatevoidSomethingClicked(objectsender,RoutedEventArgse)
{
eventCounter++;
Страницы
- « первая
- ‹ предыдущая
- …
- 122
- 123
- 124
- 125
- 126
- …
- следующая ›
- последняя »