Change a Control's Font Weight on Mouse Over : Font « 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 » FontScreenshots 
Change a Control's Font Weight on Mouse Over
Change a Control's Font Weight on Mouse Over
      

<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="" Height="120" Width="240">

    <Window.Resources>
        <Style TargetType="{x:Type Button}">
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="FontWeight" Value="Bold" />
                </Trigger>
            </Style.Triggers>
        </Style>

    </Window.Resources>

    <StackPanel Margin="8">
        <Button Height="25" Width="100" Margin="4">
            Mouse Over Me!
        </Button>
    </StackPanel>

</Window>

   
    
    
    
    
    
  
Related examples in the same category
1.FontSize unitsFontSize units
2.Display Simple Text with TextBlock and set font, alignmentDisplay Simple Text with TextBlock and set font, alignment
3.Section Font StyleSection Font Style
4.Adding TextBlock to StackPanel with different font sizeAdding TextBlock to StackPanel with different font size
5.Using text format property aliases
6.Programmatically change the FontFamily property of a TextBlock element.Programmatically change the FontFamily property of a TextBlock element.
7.Font Properties SampleFont Properties Sample
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.