GVKun编程网logo

Silverlight 5 Grid组的MouseLeave响应

10

如果您想了解Silverlight5Grid组的MouseLeave响应的相关知识,那么本文是一篇不可错过的文章,我们将为您提供关于Javascript创建SilverlightPlugin以及自定义

如果您想了解Silverlight 5 Grid组的MouseLeave响应的相关知识,那么本文是一篇不可错过的文章,我们将为您提供关于Javascript创建Silverlight Plugin以及自定义nonSilverlight和lowSilverlight样式_javascript技巧、Silverlight 5 beta新特性探索系列:1.安装Silverlight 5 beta环境以及OOB模式下Silverlight 5 多窗口支持、Silverlight DataGrid(1) 今天找到關於Silverlight DataGrid 的一些技巧,記錄下來,以備後用.、Silverlight DataGrid组件具体特点详解的有价值的信息。

本文目录一览:

Silverlight 5 Grid组的MouseLeave响应

Silverlight 5 Grid组的MouseLeave响应

用Silverlight 5作个用户控件,即是用Grid画几个格子,分别显示几张透明图片。效果是显示中间那张,点击显示的图片后将其它几张图片一起显示出来,鼠标立刻这个用户控件范围后自动隐藏点击后显示出来的图片

xaml代码如下:

       <Grid x:Name="oViewImg" Height="280" Width="280">
        <Grid.RowDeFinitions>
            <RowDeFinition Height="37"></RowDeFinition>
            <RowDeFinition></RowDeFinition>
            <RowDeFinition Height="37"></RowDeFinition>
        </Grid.RowDeFinitions>
        <Grid.ColumnDeFinitions>
            <ColumnDeFinition Width="37"></ColumnDeFinition>
            <ColumnDeFinition></ColumnDeFinition>
            <ColumnDeFinition Width="37"></ColumnDeFinition>
        </Grid.ColumnDeFinitions>
        <Image x:Name="img01" Source="/img/img01.png" Grid.Row="0" Grid.Column="0"/>
        <Image x:Name="img02" Source="/img/img02.png" Grid.Row="0" Grid.Column="2"/>
        <Image x:Name="img02" Source="/img/img03.png" Grid.Row="2" Grid.Column="0"/>
        <Image x:Name="img03" Source="/img/img04.png" Grid.Row="2" Grid.Column="2"/>
        <Image x:Name="oImage" Source="/img/temp/img.png" Grid.Column="1" Grid.Row="1" Height="206"/>
        </Grid>


目标是:初始隐藏img01-img04只显示oImage图片,点击oImage后再显示出这次张图片,然后鼠标离开oViewImg范围后隐藏img01-img04。

我很理想的写下以下代码:

        public scLampItem(mLabmpItem labmp)
        {
            this.oImage.MouseLeftButtonDown += oyiboyCode_MouseLeftButtonDown;
           this.oViewImg.MouseLeave += oyiboyCode_MouseLeave;</span>
        }

        void oyiboyCode_MouseLeftButtonDown(object sender,MouseButtonEventArgs e)
        {
            this.img00.Visibility = System.Windows.Visibility.Visible;
            this.img02.Visibility = System.Windows.Visibility.Visible;
            this.img20.Visibility = System.Windows.Visibility.Visible;
            this.img22.Visibility = System.Windows.Visibility.Visible;
        }
        void oyiboyCode_MouseLeave(object sender,MouseEventArgs e)</span>
        {
            this.img00.Visibility = System.Windows.Visibility.Collapsed;
            this.img02.Visibility = System.Windows.Visibility.Collapsed;
            this.img20.Visibility = System.Windows.Visibility.Collapsed;
            this.img22.Visibility = System.Windows.Visibility.Collapsed;
        }

然后抓狂的事来了。鼠标离开oImage就立刻隐藏了四张图片,而不是我想象的那样,移出了oViewImg的范围才触发MouseLeave事件。问了度娘后才知道,Grid没有背景/背景色的情况下是不能触发事件的,也就是鼠标移到oImage和img01-img02之间的空白区域时就触发了MouseLeave事件。为此猛钻牛角尖去找鼠标位置搜索妄想通过计算鼠标的位置来进行判断鼠标是否在Grid范围之类的办法去来触发隐藏操作。忙乎了一上午,中午吃饭时突然想到...没背景和背景色的情况下不能触发,我给它个背景色不就行了吗。然后吃完饭后写下了以下代码。

        public scLampItem(mLabmpItem labmp)
        {
            this.oImage.MouseLeftButtonDown += oyiboyCode_MouseLeftButtonDown;
            this.oViewImg.MouseLeave += oyiboyCode_MouseLeave;
        }

        void oyiboyCode_MouseLeftButtonDown(object sender,MouseButtonEventArgs e)
        {
            this.img00.Visibility = System.Windows.Visibility.Visible;
            this.img02.Visibility = System.Windows.Visibility.Visible;
            this.img20.Visibility = System.Windows.Visibility.Visible;
            this.img22.Visibility = System.Windows.Visibility.Visible;
	    //给Grid一个完全透明的背景色,以保证整Grid范围都能触发事件
	    this.oViewImg.SetValue(Grid.BackgroundProperty,new SolidColorBrush(Color.FromArgb(0,255,255)));
        }
        void oyiboyCode_MouseLeave(object sender,MouseEventArgs e)
        {
            this.img00.Visibility = System.Windows.Visibility.Collapsed;
            this.img02.Visibility = System.Windows.Visibility.Collapsed;
            this.img20.Visibility = System.Windows.Visibility.Collapsed;
            this.img22.Visibility = System.Windows.Visibility.Collapsed;
            //移除Grid背景色,保证img01-img04隐藏后的区域不会触发事件
	    this.oViewBigImg.ClearValue(Grid.BackgroundProperty);
        }

为这个折腾了一上午,亏死了,作为经验记录一下,省得下次还这样浪费脑力和时间

Javascript创建Silverlight Plugin以及自定义nonSilverlight和lowSilverlight样式_javascript技巧

Javascript创建Silverlight Plugin以及自定义nonSilverlight和lowSilverlight样式_javascript技巧

默认情况下,生成的页面代码可能与下面的代码类似:

复制代码 代码如下:




IRERTranscript














Get Microsoft Silverlight






  我们可以给object对象传递不同的参数,如xap包的加载地址,onLoad或onError事件句柄,背景色,最小版本号支持等等,完整的参数信息读者可以参考Silverlight 3中param参数列表汇总。object对象中一般会包含一段标记,是用来显示当客户端浏览器未安装Silverlight插件时要显示的内容的,我们可以自定义其中的内容,如:
复制代码 代码如下:







Javascript创建Silverlight Plugin以及自定义nonSilverlight和lowSilverlight样式_javascript技巧





  当客户端浏览器未安装Silverlight插件时,程序会在相应的区域显示一张带有热区的图片,热区指向的位置是Microsoft提供的Silverlight安装地址。理论上,你可以指定任何的自定义代码来显示nonSilverlight的效果,但是Silverlight默认没有提供低版本Silverlight情况下要显示的效果,也就是lowSilverlight的情况。
Silverlight可以自动实现向前兼容,也就是在低版本下编译的Silverlight包可以在高版本下运行,相反,在高版本下编译的Silverlight包不能再低版本下运行,此时Silverlight插件会显示一张默认的图片用来告知用户升级插件,并弹出一个提示框,如下图:

Javascript创建Silverlight Plugin以及自定义nonSilverlight和lowSilverlight样式_javascript技巧

 

Javascript创建Silverlight Plugin以及自定义nonSilverlight和lowSilverlight样式_javascript技巧

 

  个人觉得这种用户体验并非很好,试想,如果当前页面上有多个Silverlight插件,岂不是要弹出多个提示框吗?那么如何来解决这个问题呢?事实上,我们除了直接在页面上添加object标记来呈现Silverlight外,还可以通过javascript脚本来动态添加Silverlight。Silverlight.js脚本为我们提供了一系列可用的方法,详细内容大家可以参考下msdn http://msdn.microsoft.com/zh-cn/library/cc838126(v=VS.95).aspx#isinstalled

  以及如何通过脚本在页面上添加Silverlight,http://msdn.microsoft.com/zh-cn/library/cc265155(v=VS.95).aspx

  msdn上给出了非常详细的例子来告诉我们如何使用这些脚本方法,有一点需要注意,使用Silverlight.js文件时一定要与当前Silverlight版本相一致,否则可能会有脚本错误,对应的Silverlight.js文件可以在微软的站点上下载,你会发现其实有很多个可用的版本,其中还包括支持调试的版本哦。

  createObject方法参数在使用的时候有几个问题需要注意下:

  1. 参数按顺序指定,如果有不需要传递的参数可用null代替。

  2. parent element参数必须指定,也就是object标记的父元素,可直接将元素的id当做对象传入,但是在Firefox中不支持,此时可以使用document.getElementById(''elementId'')语句代替该参数即可。

  3. param列表通过数组传递,参数名称与在object标记中使用的名称保持一致即可。

  4. 事件列表如果没有对应的页面脚本则传null值,否则会报脚本错误。

  5. 最后一个参数context如果不需要可以省去,不用传null或空值。

  你应该注意到了,在使用createObject方法时我们可以顺便给Silverlight指定nonSilverlight效果,这个是通过param列表中的altHtml参数来指定的,实施上,我们在页面上直接使用object标记呈现Silverlight时也可以使用alt属性来指定nonSilverlight效果,这个与在object标记中直接插入html代码的效果相同。
通过使用createObject方法,我们完全可以自定义lowSilverlight效果了,下面是一个例子:

复制代码 代码如下:






  使用Silverlight.isInstalled()方法可以判断客户端浏览器是否已经安装了指定版本的Silverlight插件,如果已经安装了,则使用Silverlight.createObject方法创建Silverlight对象,否则输出自定义的内容。

这里还有一篇文章个人觉得很有用,给大家分享下吧!

http://www.itstrike.cn/Question/Use-JavaScript-to-create-Silverlight-Object-createObject

Silverlight 5 beta新特性探索系列:1.安装Silverlight 5 beta环境以及OOB模式下Silverlight 5 多窗口支持

Silverlight 5 beta新特性探索系列:1.安装Silverlight 5 beta环境以及OOB模式下Silverlight 5 多窗口支持

        Silverlight 5 beta版本总算于昨日放出,怀着激动的心情今天将开发环境更新为Silverlight 5 beta版本,并且接触Silverlight 5 beta的第一个新特性:OOB模式下的多窗口的弹出显示。

        现在我们开始Silverlight 5 Beta版本的安装,首先需要为VS2010打一个VS2010 SP1补丁,然后我们再下载Silverlight 5 Beta Tools for Visual Studio SP1,一步一步安装完毕,最后我们下载Silverlight 5 Features Document 新特性的文档。至此我们即可踏上Silverlight 5开发的征程。

        对于Silverlight 5 beta版本下面的新窗口的支持是基于OOB模式下的,所以我们首先新建一个Silverlight 5的应用程序,然后右键项目属性-->"允许浏览器外运行应用程序"勾中-->点击"浏览器外设置"-->"在浏览器外运行时需要提升 的信任"勾上。如下图所示:

        然后我们在后台代码中键入以下代码即可弹出一个窗口,点击窗口中的按钮我们可以继续弹出窗口,实现了无限制的弹出窗口。当然所有弹出的子窗口都是依赖于父 窗口而存在的。(Tip:在Silverlight 4.0中的Window类修改的大小都是自身窗口的大小,并不能弹出窗口)

 

  
  
  1. public partial class MainPage : UserControl 
  2.   { 
  3.       public MainPage() 
  4.       { 
  5.           InitializeComponent(); 
  6.           PopWindow(400.0, 20.0, "第"+Flag+"个实例窗口"); 
  7.       } 
  8.       public static int Flag = 0; 
  9.       private void PopWindow(double left,double top,string title ) 
  10.       { 
  11.           //设置Window的通用属性 
  12.           Window testwindow = new Window(); 
  13.           testwindow.Height = 400; 
  14.           testwindow.Width = 500; 
  15.           testwindow.Top = top
  16.           testwindow.Left = left
  17.           testwindow.Title = title; 
  18.           testwindow.Visibility = Visibility.Visible; 
  19.  
  20.           //添加一个内部有按钮的Canvas,设置Canvas的背景色为白色 
  21.           Button btn=new Button(); 
  22.           btn.Width=80.0; 
  23.           btn.Height=30.0; 
  24.           btn.Content="点  击"
  25.           btn.Margin = new Thickness(5, top + Flag * 10, 0, 0); 
  26.           btn.Click += new RoutedEventHandler(btn_Click); 
  27.           Canvas canvas = new Canvas(); 
  28.           canvas.Children.Add(btn); 
  29.           canvas.Background = new SolidColorBrush(Colors.White); 
  30.           testwindow.Content = canvas; 
  31.  
  32.           //窗口默认值是WindowState.normal正常情况 
  33.           testwindow.WindowState = WindowState.normal; 
  34.               //WindowState.Maximized; 窗口最大化 
  35.               //WindowState.Minimized; 窗口最小化 
  36.               //WindowState.normal;    普通窗口 
  37.  
  38.       void btn_Click(object sender, RoutedEventArgs e) 
  39.       { 
  40.           PopWindow(400.0, "第"+Flag+"个实例窗口"); 
  41.       } 
  42.   } 

        本实例采用VS2010 +Silverlight 5 beta制作,如需源码请点击 SL5First.zip 下载。

Silverlight DataGrid(1) 今天找到關於Silverlight DataGrid 的一些技巧,記錄下來,以備後用.

Silverlight DataGrid(1) 今天找到關於Silverlight DataGrid 的一些技巧,記錄下來,以備後用.

Silverlight DataGrid(1)

今天找到關於Silverlight DataGrid 的一些技巧,記錄下來,以備後用.

   

Using The Silverlight DataGrid

If you have ever worked on an application that displayed large amounts of data,one of the cornerstones of your application was probably a DataGrid control.  We have provided four .NET DataGrids over the years,two for ASP.NET and two for Windows Forms,but until Now Silverlight and WPF were left out of the party. 

At MIX 2008 we shipped the first preview of the Silverlight DataGrid and a preview of it in WPF was also shown.  Now that it is out there people want to kNow how to use it.  If you are one of those people,then you have come to the right place.  Here's a quick guide on how to get up and running with a Silverlight DataGrid.

Step 0: Create A Silverlight Project

Start a new Silverlight Application as outlined in my previous post.  When given the option,choose the default "Add a new Web" option.

Step 1: Add a DataGrid

If everything went smoothly in the prevIoUs step,your project should be loaded and opened to Page.xaml.  Now just find the DataGrid on the ToolBox and drag it into the root layout Grid named "LayoutRoot".

   

This does a few things behind the scenes:

  • It adds a reference in your Silverlight project to System.Windows.Controls.Data
  • It adds an xmlns called "my" to the root UserControl that specifies that the DataGrid is in the System.Windows.Controls namespace and located in the System.Windows.Controls.Data assembly
    xmlns:my="clr-namespace:System.Windows.Controls; assembly=System.Windows.Controls.Data"
  • It adds an instance of the DataGrid as a child of "LayoutRoot"
    <my:DataGrid></my:DataGrid>

If you are the type of the person who likes to see things working after each step,feel free to F5 (choose the option to allow debugging in the popup) and take in the awesome sight that is an empty DataGrid.

Not much here,so lets fill it with something.

 Step 2: Set the ItemsSource and AutoGenerateColumns

The way to make a DataGrid interesting is by giving it some data.  This is done through the DataGrid's ItemsSource property.  This is same property that other controls in WPF and Silverlight,such as ListBox,use to specify where they will get their data.  The one difference here is that you cannot place arbitrary content in it and have it create a collection for you.

Instead you need to provide it a collection of anything that implements IEnumerable such as a List or ObservableCollection.

The ItemsSource can be specified inline in XAML such as:

<my:DataGrid x:Name="dg" AutoGenerateColumns="True">
<
my:DataGrid.ItemsSource>
<!--Something that implements IEnumerable -->
</my:DataGrid.ItemsSource>
</
my:DataGrid>

However,it is more commonly set in code behind,which is what we will do in this example. 

Step 2 A: Name the Grid and Set AutoGenerateColumns to True

Before we go to the code behind there are two things that we will want to do while we are still in XAML:

<my:DataGrid x:Name="dg" AutoGenerateColumns="True"></my:DataGrid>

  • Give the DataGrid the name "dg"
  • Set AutoGenerateColumns to true.  If you have worked with prevIoUs DataGrids you might have encountered the AutoGenerateColumns property.  This is a convenience property that lets you get up and running quickly,since it will tell the DataGrid to look at the items in its ItemsSource and try to create a column to display each field or property.  You should note that columns are only generated when the ItemsSource property is being set or changed,so if you change the value of AutoGenerateColumns after the DataGrid already has an ItemsSource specified,no columns will be generated until the next time the ItemsSource property is changed.

Step 2 B: Create and Set the Items Source

Now that the DataGrid is ready to have its ItemsSource set,go to the Page's constructor located in the code behind file for Page.xaml (A handy shortcut to do this from within Page.xaml is F7) and add the following line below InitializeComponent:

C#

public Page()
{
InitializeComponent();
dg.ItemsSource = "H e l l o W o r l d !".Split();
}

VB

Public Sub New()
InitializeComponent()
dg.ItemsSource = "H e l l o W o r l d !".Split()
End Sub

(If you get the build error: "The name 'dg' does not exist in the current context" with the code above be sure to build a second time so that the name has a chance to propigate) 

One of the easiest ways to generate an IEnumerable collection is String.Split.  When the resulting array is set as the ItemsSource of the DataGrid a column will be automatically generated since AutoGenerateColumns is true.  When you run the application,it will look like this:

This is a little better,but so far this Could be done with a ListBox.  Lets add some more complicated data so that we actually need to use a DataGrid.

Add a new class to your Silverlight project (not the Web project) and name it "Data".

Then add a few properties to bind to.

C#

If you are using C#,you can use the great 3.0 Automatic Properties feature.

public class Data
{
public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get; set; }
public bool Available { get; set; }
}

VB

Public Class Data
Private _firstName As String
Private
_lastName As String
Private
_age As Integer
Private
_available As Boolean

Property
FirstName() As String
Get
Return
_firstName
End Get
Set
(ByVal value As String)
_firstName = value
End Set
End Property

Property
LastName() As String
Get
Return
_lastName
End Get
Set
(ByVal value As String)
_lastName = value
End Set
End Property

Property
Age() As Integer
Get
Return
_age
End Get
Set
(ByVal value As Integer)
_age = value
End Set
End Property

Property
Available() As Boolean
Get
Return
_available
End Get
Set
(ByVal value As Boolean)
_available = value
End Set
End Property
End Class

Once the Data class is defined,it can Now be used to provide data for the DataGrid.  Go back to the code behind file for Page.xaml and replace the prevIoUs ItemsSource assignment with the following.  A useful trick here is to use the C# and VB 3.0 Object Initializer feature to initialize the Data objects as we add them to the List.

C#

public Page()
{
InitializeComponent();
//dg.ItemsSource = "H e l l o W o r l d !".Split();

List<Data> source = new List<Data>();
int itemsCount = 100;

for (int i = 0; i < itemsCount; i++)
{
source.Add(new Data()
{
FirstName = "First",
LastName = "Last",
Age = i,
Available = (i % 2 == 0)
});
}

dg.ItemsSource = source;
}

VB

Public Sub New()
InitializeComponent()
'dg.ItemsSource = "H e l l o W o r l d !".Split()

Dim Source As List(Of Data) = New List(Of Data)
Dim ItemsCount As Integer = 100

For index As Integer = 1 To ItemsCount
Source.Add(New Data() With _
{ _
.FirstName = "First",_
.LastName = "Last",_
.Age = index,_      .Available = (index Mod 2 = 0) _
})
Next

dg.ItemsSource = Source
End Sub

When you run this auto generation takes over using reflection to create a column for each property in Data setting the column header to the name of the property and choosing default column types based on the property type.  For instance the Available column is a DataGridCheckBoxColumn.

   

Step 3: Simple Customization of the DataGrid

The easiest way to customize the DataGrid is through a variety of properties.  The other two ways are through Styles and Templates which will be covered in future posts.  Some of the most useful properties for customization are:

GridlinesVisibility & HeadersVisibility

These properties are enumerations that control what gridlines and headers are displayed.

RowBackground & AlternatingRowBackground

These properties are shortcuts to setting the background color for both rows and alternating rows.

ColumnWidth & RowHeight

These properties set the default column width and default row height.

IsReadOnly & CanUserResizeColumns

These properties control if the end user can edit the data in the grid and if the columns can be resized.

For instance if you set the following properties to the following values:

<my:DataGrid x:Name="dg" AutoGenerateColumns="True"
GridlinesVisibility="Horizontal" HeadersVisibility="Column"
RowBackground="Cornsilk" AlternatingRowBackground="LemonChiffon"
ColumnWidth="85" RowHeight="30"
IsReadOnly="True" CanUserResizeColumns="False"
>
</
my:DataGrid>

You would get this:

Step 4: Enjoy

Now that you have the basics,enjoy using the DataGrid.  Next time I'll go into how to explicitly define and customize columns instead of using auto generation.

Silverlight DataGrid组件具体特点详解

Silverlight DataGrid组件具体特点详解

Silverlight开发工具中具有很多种数据组件,我们在平常的使用中往往都会因为一两个组件的不熟悉而导致整个程序的效率下降。所以对于初学者来说,这一方面的知识是非常重要的。在这里我们先来了解一下Silverlight DataGrid组件的相关方法。

说明:Silverlight DataGrid组件是Silverlight数据组件中最为常用并且是功能最为强大的数据组件。因此,对开发者而言,深入了解其特性是十分有必要的。本文先介绍该组件的基本特性,接着通过几个简单实例来说明该组件的基本数据操作过程。


Silverlight DataGrid组件所在命名空间:

System.Windows.Controls


Silverlight DataGrid组件常用方法:

BeginEdit:使DataGrid进入编辑状态。

CancelEdit:取消DataGrid的编辑状态。

CollapseRowGroup:闭合DataGrid的行分组。

CommitEdit:确认DataGrid的编辑完成。

ExpandRowGroup:展开DataGrid的行分组。

GetGroupFromItem:从具体Item中得到分组。

ScrollIntoView:滚动DataGrid视图。


Silverlight DataGrid组件常用属性:

AlternatingRowBackground:获取或设置一个笔刷用来描绘DataGrid奇数行的背景。

AreRowDetailsFrozen:获取或设置一个值用来判断是否冻结每行内容的详细信息。

AreRowGroupHeadersFrozen:获取或设置一个值用来判断是否冻结分组行的头部。

AutoGenerateColumns:获取或设置一个值用来判断是否允许自动生成表列。

CanUserReorderColumns:获取或设置一个值用来判断是否允许用户重新排列表列的位置。

CanUserSortColumns:获取或设置一个值用来判断是否允许用户按列对表中内容进行排序。

CellStyle:获取或设置单元格的样式。

ColumnHeaderHeight:获取或设置列头的高度。

ColumnHeaderStyle:获取或设置列头的样式。

Columns:获取组件中包含所有列的集合。

ColumnWidth:获取或设置列宽。

CurrentColumn:获取或设置包含当前单元格的列。

CurrentItem:获取包含当前单元格且与行绑定的数据项。

DragIndicatorStyle:获取或设置当拖曳列头时的样式。

DropLocationIndicatorStyle:获取或设置呈现列头时的样式。

FrozenColumnCount:获取或设置冻结列的个数。

GridLinesVisibility:获取或设置网格线的显示形式。

HeadersVisibility:获取或设置行头及列头的显示形式。

HorizontalGridLinesBrush:获取或设置水平网格线的笔刷。

HorizontalScrollBarVisibility:获取或设置水平滚动条的显示样式。

IsReadOnly:获取或设置DataGrid是否为只读。

MaxColumnWidth:获取或设置DataGrid的最大列宽。

MinColumnWidth:获取或设置DataGrid的最小列宽。

RowBackground:获取或设置用于填充行背景的笔刷。

RowDetailstemplate:获取或设置被用于显示行详细部分的内容的模板。

RowDetailsVisibilityMode:获取或设置一个值用以判定行详细部分是否显示。

RowGroupHeaderStyles:获取呈现行分组头部的样式。

RowHeaderStyle:获取或设置呈现行头的样式。

RowHeaderWidth:获取或设置行头的宽度。

RowHeight:获取或设置每行的高度。

RowStyle:获取或设置呈现行时的样式。

Selectedindex:获取或设置当前选中部分的索引值。

SelectedItem:获取或设置与当前被选中行绑定的数据项。

SelectedItems:获取与当前被选中的各行绑定的数据项们的列表(List)。

SelectionMode:获取或设置DataGrid的选取模式。

VerticalGridLinesBrush:获取或设置垂直网格线的笔刷。

VerticalScrollBarVisibility:获取或设置垂直滚动条的显示样式。


Silverlight DataGrid组件常用事件:

BeginningEdit:发生于一个单元格或行进入编辑模式之前。

CellEditEnded:发生于一个单元格编辑已被确认或取消。

CellEditEnding:发生于一个单元格正在结束编辑时。

CurrentCellChanged:发生于一个单元格成为当前单元格时。

PreparingCellForEdit:发生于在DataGridTemplateColumn下的单元格进入编辑模式时。

SelectionChanged:发生于当SelectedItem或SelectedItems属性值改变时。

今天关于Silverlight 5 Grid组的MouseLeave响应的讲解已经结束,谢谢您的阅读,如果想了解更多关于Javascript创建Silverlight Plugin以及自定义nonSilverlight和lowSilverlight样式_javascript技巧、Silverlight 5 beta新特性探索系列:1.安装Silverlight 5 beta环境以及OOB模式下Silverlight 5 多窗口支持、Silverlight DataGrid(1) 今天找到關於Silverlight DataGrid 的一些技巧,記錄下來,以備後用.、Silverlight DataGrid组件具体特点详解的相关知识,请在本站搜索。

本文标签:

上一篇出于安全原因,服务器是否应该验证带有 HttpOnly 的 Cookie?(服务器端验证是为了保证给用户较快的响应速度)

下一篇Silverlight 5 Beta新特性[6]低延迟对WAV格式声音效果支持(低延迟模式原理)