How to Create a User Control in WPF


Hi am back again :)
In asp.net we used to register user control by using register directive but in wpf
we are usinng it with the help of xmlns which is 

suppose we have two wpf file say 
windows1.xaml and timer.xaml.

In window1 we want to register user control Timer.xaml,we can do it with the help of following piece of code
Where Timer is the file name where we have define our functionality and its a user control.

<Window x:Class="UserControlDemo.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:uc1="clr-namespace:UserControlDemo"
    Title="Window1" Height="300" Width="300">
    <Grid>
        
        <uc1:Timer></uc1:Timer>
    </Grid>
</Window>



Thanks give me yours comments if u like this this blog .....