Silverlight学习笔记八右键菜单控件

 ContextMenu是Sliverlight中的右键菜单控件

<Controls:ContextMenuService.ContextMenu>
                            <Controls:ContextMenu>
                               
                                <Controls:MenuItem Header="查询" x:Name="cmiQuery" Click="cmiQuery_Click">
                                    <Controls:MenuItem.Icon>
                                        <Image Source="http://www.cnblogs.com/Images/ButtonSearch.png" />
                                    </Controls:MenuItem.Icon>
                                </Controls:MenuItem>

                                <Controls:MenuItem Header="添加" x:Name="cmiAdd" Click="cmiAdd_Click">
                                    <Controls:MenuItem.Icon>
                                        <Image Source="http://www.cnblogs.com/Images/add.png"/>
                                    </Controls:MenuItem.Icon>
                                </Controls:MenuItem>

                                <Controls:MenuItem Header="修改" x:Name="cmiUpdate" Click="cmiUpdate_Click">
                                    <Controls:MenuItem.Icon>
                                        <Image Source="http://www.cnblogs.com/Images/ButtonEdit.png"/>
                                    </Controls:MenuItem.Icon>
                                </Controls:MenuItem>

                                <Controls:MenuItem Header="删除" x:Name="cmiDelete" Click="cmiDelete_Click">
                                    <Controls:MenuItem.Icon>
                                        <Image Source="http://www.cnblogs.com/Images/ButtonSaveAndClose.png"/>
                                    </Controls:MenuItem.Icon>
                                </Controls:MenuItem>

                                <Controls:MenuItem Header="审核" x:Name="cmiPassd" IsEnabled="False">
                                    <Controls:MenuItem.Icon>
                                        <Image Source="http://www.cnblogs.com/Images/ButtonSaveTo.png"/>
                                    </Controls:MenuItem.Icon>
                                </Controls:MenuItem>

                            </Controls:ContextMenu>
                        </Controls:ContextMenuService.ContextMenu>

posted @ 2010-07-12 23:00  ForrestWoo  阅读(1354)  评论(0编辑  收藏  举报