June 6, 2011

Code Example for Button with Border in WPF

Below is the code sample to create Button with Border in WPF


<Page x:Class="TestWPF.ExBorder"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ExBorder">
    <Grid>
        <Border Width=" 140" Height=" 70" CornerRadius="6">
            <Border.Background >
                <SolidColorBrush   Color="BurlyWood" ></SolidColorBrush>
                
            </Border.Background>
            <Border.Effect >
                
                <DropShadowEffect BlurRadius=" 15"  Color="BlanchedAlmond" ShadowDepth="15" Opacity=" 5" Direction=" 160" ></DropShadowEffect>
                
            </Border.Effect>
            <Border.Child >
                
                <Button  Height="60" Width=" 130" Content=" Button With Border"></Button>
                
            </Border.Child>
            
            
            
        </Border>
    </Grid>
</Page>


See the Button 

No comments:

Post a Comment