首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > CAD教程 >

步步为营Silverlight

2012-09-08 
稳扎稳打Silverlight示例1、IMarkupExtension(自定义 XAML 扩展标记)XAML/ConcatMarkupExtension.csusing S

稳扎稳打Silverlight

示例
1、IMarkupExtension(自定义 XAML 扩展标记)
XAML/ConcatMarkupExtension.cs

using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Windows;using System.Windows.Controls;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Animation;using System.Windows.Shapes;using System.Windows.Navigation;namespace Silverlight50.Other{    public partial class ClickCount : Page    {        public ClickCount()        {            InitializeComponent();        }        protected override void OnNavigatedTo(NavigationEventArgs e)        {        }        private void rectangle_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)        {            /*             * MouseButtonEventArgs.ClickCount - 获取连击的次数             * 注:连击的最大间隔时间是由操作系统的"控制面板"-->"鼠标"-->"双击速度"设置的             */            if (e.ClickCount == 1) // Single Click                txt.Text = "Left Mouse Click Counter:" + e.ClickCount.ToString();            else if (e.ClickCount == 2) // Double Click                txt.Text = "Left Mouse Click Counter:" + e.ClickCount.ToString();            else // More Click                txt.Text = "Left Mouse Click Counter:" + e.ClickCount.ToString();        }    }}

热点排行