Use StatusBar : StatusBar « 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 » StatusBarScreenshots 
Use StatusBar
Use StatusBar
      
<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Use StatusBar" Height="125" Width="300">
    <Grid>
        <StatusBar Height="30" Name="StatusBar1" VerticalAlignment="Bottom">
            <StatusBarItem>
                <Label Name="lblStatus" Content="Off" />
            </StatusBarItem>
            <Separator/>
            <Image Source="c:\image.bmp" Width="15" Height="15" />
            <Separator/>
            <StatusBarItem HorizontalAlignment="Right" >
                <Label Name="lblRunning" Content="Stopped" />
            </StatusBarItem>
        </StatusBar>
        <CheckBox Height="16" HorizontalAlignment="Left" Margin="10,10,0,0" Name="chkOnOff" VerticalAlignment="Top" Width="120" Content="Active" ToolTip="Click to activate">
            <CheckBox.Triggers>
                <EventTrigger RoutedEvent="CheckBox.Checked">
                    <EventTrigger.Actions>
                        <BeginStoryboard>
                            <Storyboard>
                                <StringAnimationUsingKeyFrames Storyboard.TargetName="lblStatus"
Storyboard.TargetProperty="Content">
                                    <StringAnimationUsingKeyFrames.KeyFrames>
                                        <DiscreteStringKeyFrame Value="On" KeyTime="0:0:0" />
                                    </StringAnimationUsingKeyFrames.KeyFrames>
                                </StringAnimationUsingKeyFrames>
                                <StringAnimationUsingKeyFrames
                                    Storyboard.TargetName="lblRunning"
                                    Storyboard.TargetProperty="Content">
                                    <StringAnimationUsingKeyFrames.KeyFrames>
                                        <DiscreteStringKeyFrame Value="Running..." KeyTime="0:0:0" />
                                    </StringAnimationUsingKeyFrames.KeyFrames>
                                </StringAnimationUsingKeyFrames>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
                <EventTrigger RoutedEvent="CheckBox.Unchecked">
                    <EventTrigger.Actions>
                        <BeginStoryboard>
                            <Storyboard>
                                <StringAnimationUsingKeyFrames
                                    Storyboard.TargetName="lblStatus"
                                    Storyboard.TargetProperty="Content">
                                    <StringAnimationUsingKeyFrames.KeyFrames>
                                        <DiscreteStringKeyFrame Value="Off" KeyTime="0:0:0" />
                                    </StringAnimationUsingKeyFrames.KeyFrames>
                                </StringAnimationUsingKeyFrames>
                                <StringAnimationUsingKeyFrames
                                    Storyboard.TargetName="lblRunning"
                                    Storyboard.TargetProperty="Content">
                                    <StringAnimationUsingKeyFrames.KeyFrames>
                                        <DiscreteStringKeyFrame Value="Stopped" KeyTime="0:0:0" />
                                    </StringAnimationUsingKeyFrames.KeyFrames>
                                </StringAnimationUsingKeyFrames>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
            </CheckBox.Triggers>
        </CheckBox>
    </Grid>
</Window>

   
    
    
    
    
    
  
Related examples in the same category
1.StatusBar and StatusBarItemStatusBar and StatusBarItem
2.Add TextBlock to StatusbarAdd TextBlock to Statusbar
3.Items that can be placed in a StatusBarItems that can be placed in a StatusBar
4.Put Image with tooltip onto statusbarPut Image with tooltip onto statusbar
5.Make Group onto StatusbarMake Group onto Statusbar
6.Add Image to StatusbarAdd Image to Statusbar
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.