Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Find out the new features and enhancements added in Silverlight 5.

Moderators

Top Categories · View All
Controls Enhancements 11
Text Enhancements 3
Trusted Applications Features 2

Browse by Tags · View All
Silverlight 5 16
Controls 11
Text Enhancements 3
RichTextBlockOverflow 2
RichTextblock 2
CharacterSpacing 1
UpdateSourceTrigger 1
PropertyChanged 1
Out Of Browser Features 1
P/Invoke 1
Multiple Windows 1
Trusted Applications 1
Styles 1
Relative Source Binding 1
PivotViewer 1
Custom Markup Extensions 1
Implicit Data Templates 1
Data Templates 1
Debugging 1
Debugging in XAML 1

Browse by Release · View All
All 15
RC 1

What is new in Silverlight 5

Silverlight 5 - Support for multiple clicks count

Dec 15 2011 8:33AM by Ramireddy   

Silverlight 5 now supports,multiple clicks events like double click, triple clicks etc. MouseLeftButtonDown event exposes a property, "ClickCount", which indicates how many times mouse has been clicked.

In below example, when you click on mouse multiple times, textblock will indicates how many times you clicked, whether its double click or triple click. When you click on it after some time, you can see it reset to 1.

  1. In XAML, add the following markup.

      <Button x:Name="btnClick" ClickMode="Hover" Content="Click Me" Grid.Row="0"  Width="200"     MouseLeftButtonDown="btnClick_MouseLeftButtonDown" >
      </Button>
      <TextBlock  x:Name="txtClick" Grid.Row="1"></TextBlock>
    
  2. In Code-Behind, implement mouse left button down event like below.

        private void btnClick_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {            
            txtClick.Text = "No Of Clicks"  + e.ClickCount.ToString();
        }
    

When you run the page, you can see when you click on button multiple times, textblock will tells how many times it has been clicked. After some time, when you click on it, you can see, click count started from 1 again.

Read More Have you written a blog post or article related to this feature and want to get them added here? Read More...
Category : Controls Enhancements
Release : All
Tags : Silverlight 5,Controls,ClickCount


Ramireddy
2 · 40% · 12972
3



Submit

Your Comment


Sign Up or Login to post a comment.

"Silverlight 5 - Support for multiple clicks count" rated 5 out of 5 by 3 readers
Silverlight 5 - Support for multiple clicks count , 5.0 out of 5 based on 3 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]