Silverlight鼠标样式的控制

以下为Silverlight鼠标的控制:圆点,普通,箭头,等待,四方体,无鼠标等等....

 

XAML代码
<UserControl x:Class="SilverlightApplication2.MainPage"
xmlns
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x
="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d
="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable
="d" d:DesignWidth="640" d:DesignHeight="480">
<Grid x:Name="LayoutRoot" Width="700" Height="700" Background="Blue">

</Grid>
</UserControl>

 

CS代码
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
Cursor = Cursors.Arrow;//普通
//Cursor = Cursors.Hand;//手型
//Cursor = Cursors.IBeam;//I型
//Cursor = Cursors.None;//无鼠标
//Cursor = Cursors.SizeNS;//上下拉升箭头
//Cursor = Cursors.SizeWE;//左右拉升箭头
//Cursor = Cursors.Stylus;//圆点
//Cursor = Cursors.Wait;//等待
//Cursor = Cursors.Eraser;//橡皮檫
}
}

 

posted @ 2010-02-24 13:28  妙明本心  阅读(493)  评论(0)    收藏  举报