static bool isbool = false;
private void BindGameDelete()
{
Tile tile = new Tile(); List<Color> list = new List<Color>();
list.Add(Colors.Blue);
list.Add(Colors.Brown);
if (isbool)
{
tile.Background = new SolidColorBrush(list[]);
isbool = false;
}
else
{
tile.Background = new SolidColorBrush(list[]);
isbool = true;
} tile.Width = ;
tile.Height = ; ContextMenu cm = new ContextMenu();
cm.IsZoomEnabled = false;
RoutedEventHandler clickHandler = new RoutedEventHandler(GameDelete_Click); // Add "edit" entry
MenuItem menuItem = new MenuItem()
{
Header = "取消关注",
Tag = "Delete"
}; menuItem.Click += clickHandler;
cm.Items.Add(menuItem); ContextMenuService.SetContextMenu(tile, cm); addTile.Children.Add(tile);
}
private void GameDelete_Click(object sender, RoutedEventArgs e)
{
var gameToDelte = ((MenuItem)sender).CommandParameter;
}
private void Tile_Hold(object sender, System.Windows.Input.GestureEventArgs e)
{
BindGameDelete(); }
           <StackPanel x:Name="addTile" Grid.Row="" Orientation="Vertical">
<c4f:Tile Background="Red" Content="" Width="" Height="" Hold="Tile_Hold"/>
<!--<c4f:Tile Background="Gray" Content="" Width="" Height=""/>
<c4f:Tile Background="Green" Content="" Width="" Height=""/>
<c4f:Tile Background="Yellow" Content="" Width="" Height=""/>
<c4f:Tile Background="Violet" Content="" Width="" Height=""/>
<c4f:Tile Background="Tomato" Content="" Width="" Height=""/>
<c4f:Tile Background="YellowGreen" Content="" Width="" Height=""/>
<c4f:Tile Background="Thistle" Content="" Width="" Height=""/>
<c4f:Tile Background="Turquoise" Content="" Width="" Height=""/>
<c4f:Tile Background="Tomato" Content="" Width="" Height=""/>
<c4f:Tile Background="Teal" Content="" Width="" Height=""/>
<c4f:Tile Background="Tan" Content="" Width="" Height=""/>
<c4f:Tile Background="SteelBlue" Content="" Width="" Height=""/>-->
</StackPanel>

wp8 入门到精通 仿美拍评论黑白列表思路的更多相关文章

  1. wp8 入门到精通 仿QQPivot 提示数量

    <Grid x:Name="LayoutRoot" Background="White"> <Grid Width="480&quo ...

  2. wp8 入门到精通 高仿微信发信息 键盘不消失

    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> < ...

  3. wp8 入门到精通 虚拟标示符 设备ID

    //获得设备虚拟标示符 wp8 public string GetWindowsLiveAnonymousID() { object anid = new object(); string anony ...

  4. wp8 入门到精通 抓包

    抓包工具Fiddler的使用 Fiddler是一款免费且功能强大的数据包抓取软件.它通过代理的方式获取程序http通讯的数据.我们可以利用它来检测网页和服务器的交互情况.下面,我们以http://bl ...

  5. wp8 入门到精通 LINQ to SQL

    http://msdn.microsoft.com/zh-cn/library/bb397924.aspx LINQ 查询操作中的类型关系 (C#) 使用一个人类发明快速检索的方法 // Northw ...

  6. wp8 入门到精通 生命周期

  7. wp8 入门到精通 定时更新瓷贴

    public class ScheduledAgent : ScheduledTaskAgent { static ScheduledAgent() { Deployment.Current.Disp ...

  8. wp8 入门到精通 ImageCompress 图片压缩

    //实例化选择器 PhotoChooserTask photoChooserTask = new PhotoChooserTask(); BitmapImage bimg; int newPixelW ...

  9. wp8 入门到精通 Gallery

    <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.Resources> ...

随机推荐

  1. Angular作用域的层级概念(scope)

    首先引入 angular 的根作用域:$rootScope ng-app:定义了angualr的作用域 ng-controller:定义了控制器 $scope定义了视图与控制器之间的纽带,而scope ...

  2. iOS播放器 - AVPlayer

    之前有说到在播放器中一点点小技巧,现在正式记录一下AVPlayer. 这里主要是说明用AVPlayer做音乐播放器的功能实现,所以不介绍AVPlayer中那个图层类. 首先我们要声明一下播放器,这里有 ...

  3. jQuery 复习

    jQuery 复习 基础知识 1, window.onload $(function(){});   $(document).ready(function(){}); 只执行函数体重的最后一个方法,事 ...

  4. sqlalchemy默认时间

    我查到的sqlalchemy默认时间有2种: from sqlalchemy.sql import func time_created = Column(DateTime(timezone=True) ...

  5. JAVA起名规范

    1:包名 package com.cenzhongman.模块名.组件 必须全部小写,作为java文件第一行代码 2:类名 名词,表示一类实物,如:人类 首字母大写 3.接口名 形容词/副词,表示一种 ...

  6. CSS3中的变形处理

    在css3中,可以利用transform功能来实现文字或者图像的旋转.缩放.倾斜.移动这四种类型的变形处理. 旋转 旋转功能使用rotate方法参数中加入角度值,方向为顺时针旋转.示例清单如下: &l ...

  7. html5新增的主体结构元素

    1.  article 主体结构元素 通常是一篇文章.一个页面.一个独立完整的内容模块一般会带个标题,并放在 header 标签中,article 元素可以互相嵌套,使用频率极高,强调独立性,多注意下 ...

  8. Dijkstra算法

    Dijkstra(迪杰斯特拉)算法是典型的单源最短路径算法,用于计算一个节点到其他所有节点的最短路径.主要特点是以起始点为中心向外层层扩展,直到扩展到终点为止. /*图的邻接矩阵表示*/typedef ...

  9. 浅谈 jQuery 事件源码定位问题

    该方法已过期,chrome 48还是49开始,自带各种流行框架的事件绑定解析. 勾上这个选项即可. 昨天群里有人问了个事件源码定位的问题,简单描述下是这样的. 在一个不是自己写的页面上,如何快速定位到 ...

  10. PHP cookie

    PHP Cookie cookie 常用于识别用户. Cookie 是什么? cookie 常用于识别用户.cookie 是一种服务器留在用户计算机上的小文件.每当同一台计算机通过浏览器请求页面时,这 ...