Email: Password:       Forgot Password 
    .netCodeSG
A Saarsha Group Online Community for dot net codes group like C#, Asp.NET, VB.NET, Sharepoint, JavaScript, JQuery, Ajax, SQL, WCF, WPF.
 
TECHNOLOGIES:
 

Make Resize an Ellipse using ScrollBar in WPF

Article:
Viewed:  1210 
Posted On:  23/09/2012 05:58:57 
In this Article I am showing how we can make resize of a control in WPF. 

In this article I am going to explain how we make resizable an Ellipse in WPF with the help of ScrollBar.

Below is my XAML code:

<Window x:Class="MakeResiziable_Using_ScrollBar_In_WPF.Window1"  
    xmlns
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"    
    xmlns
:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Resizable in WPF" Height="350" Width="350">
    <Grid>
        <ScrollBar Name="scrlbarEllipseWidth" Margin="40,30,0,0" Width="200" Height="20"
            HorizontalAlignment="Left" VerticalAlignment="Top"
            Orientation="Horizontal" Value="50" Minimum="10" Maximum="150" />

        <ScrollBar Name="scrlbarEllipseHeight" Margin="20,30,0,0" Width="20" Height="150"
            HorizontalAlignment="Left" VerticalAlignment="Top"
            Orientation="Vertical" Value="20" Minimum="10" Maximum="150" />

        <Ellipse Fill="Black"  HorizontalAlignment="Left"
            Margin="105,0,0,0"
            Height="{Binding ElementName=scrlbarEllipseHeight,Path=Value}"
            Width="{Binding ElementName=scrlbarEllipseWidth,Path=Value}"/>      

    </Grid>
</Window> 

When Run the application:

Resize1.png

Figure 1.

When use Scrllbar..

Resize2.png

 Figure 2.

Resize3.png

Figure 3.

  Comment:
         HOME   |   Submit Article   |   Contact Us   |   About Us   |   Terms & Condition   |   Advertise With us