CheckBox checked event listener : CheckBox « Windows Presentation Foundation « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Development
8.Event
9.File Directory
10.Generics
11.GUI
12.Language Basics
13.LINQ
14.Network Remote
15.Security
16.Thread
17.Windows Presentation Foundation
18.Windows System
19.XML
20.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Windows Presentation Foundation » CheckBoxScreenshots 
CheckBox checked event listener
CheckBox checked event listener
   


<Window x:Class="LayoutPanels.LocalizableText"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Layout" Height="365" Width="380" MinWidth="350" MinHeight="150">
  <Grid>
    <StackPanel>
      <Button Name="cmdPrev" Margin="10,10,10,3">Prev</Button>
      <Button Name="cmdNext" Margin="10,3,10,3">Next</Button>      
      <CheckBox Name="chkLongText" Margin="10,10,10,10" Checked="chkLongText_Checked" Unchecked="chkLongText_Unchecked">Show Long Text</CheckBox>
    </StackPanel>    
    <TextBox  Margin="0,10,10,10" TextWrapping="WrapWithOverflow">
     This behavior makes localization much easier.</TextBox>
    <Button Grid.Row="1" Grid.Column="0" Name="cmdClose" Margin="10,3,10,10">Close</Button>
  </Grid>
</Window>

//File:Window.xaml.vb

Imports System
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Shapes

Namespace LayoutPanels

  Public Partial Class LocalizableText
    Inherits Window

    Public Sub New()
      InitializeComponent()
    End Sub

    Private Sub chkLongText_Checked(sender As Object, e As RoutedEventArgs)
      cmdPrev.Content = " <- Go to the Previous Window "
      cmdNext.Content = " Go to the Next Window -> "
    End Sub

    Private Sub chkLongText_Unchecked(sender As Object, e As RoutedEventArgs)
      cmdPrev.Content = "Prev"
      cmdNext.Content = "Next"
    End Sub
  End Class
End Namespace

   
    
    
  
Related examples in the same category
1.Handles CheckBox Indeterminate events when a CheckBox changes to a indeterminate state.Handles CheckBox Indeterminate events when a CheckBox changes to a indeterminate state.
2.Handle CheckBox Unchecked eventsHandle CheckBox Unchecked events
3.Handle CheckBox checked eventsHandle CheckBox checked events
4.Use Linq to get checked CheckBoxUse Linq to get checked CheckBox
5.Check the CheckBox based on key pressed statesCheck the CheckBox based on key pressed states
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.