使用mvvmlight for win8 让GridViewItem项 实现动态命令导航
摘要:前言: 该技术前提是 已经掌握一定程度的mvvmlight for win8 技巧 实现思路: 通过Messenger 机制 动态发送导航参数 到 需要导航的page 完成导航 导航参数:public class NavigateParameter { private string pageType; public string PageType { get { return pageType; } set { pageType = value; } } ...
阅读全文
windows8 开发教程 教你制作 多点触控Helper可将任意容器内任意对象进行多点缩放
摘要:实现方法:对Manipulation进行抽象化 使不同容器可共用多点缩放事件,C# 代码如下:using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media
阅读全文
wpf+.net 4.5 surface2.0 = 异步多点触控 时间轴 part7
摘要:本开源项目svn 地址 如需加入开发或者有其他疑问请在博客留言svn://www.oksvn.com/Timeline/Win8 metro开发者联盟群号:195314253欢迎win8开发者 或对win8 开发感兴趣的 有志之士加入
阅读全文
wpf+.net 4.5 surface2.0 = 异步多点触控 时间轴 part6
摘要:最后是工具类用于扩展lambda 污染循环using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Data;
using System.Threading; namespace Transvalue.Timeline
{ public static class Pollute { public static int ToInt32(this string Value) ...
阅读全文
wpf+.net 4.5 surface2.0 = 异步多点触控 时间轴 part5
摘要:可使用多种方式将事件(UserControl 或Window或其他UIElement)内容呈现 以下是2个例子:视频方式:<UserControl xmlns:s="http://schemas.microsoft.com/surface/2008" x:Class="Transvalue.Timeline.EventVideoControlItem" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://sc
阅读全文
wpf+.net 4.5 surface2.0 = 异步多点触控 时间轴 part4
摘要:然后是一些杂七杂八的 枚举类啊 模型啊什么的。事件项xaml:<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schema...
阅读全文
wpf+.net 4.5 surface2.0 = 异步多点触控 时间轴 part3
摘要:坐标轴xaml:<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft....
阅读全文
wpf+.net 4.5 surface2.0 = 异步多点触控 时间轴 part2
摘要:先来张效果图,然后继续贴轴控件xaml :<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="http://schemas.microsoft.com/surface/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/
阅读全文
wpf+.net 4.5 surface2.0 = 异步多点触控 时间轴 part1
摘要:直接贴代码 废话不多说了。运行环境 vs11 beta framework4.5surface runtime surface sdk 2.0多点触控模拟器 multitouchVista 或多点触控设备源码请关注我的资源下载功能说明: 多点触控时间轴,事件可缩放 旋转 多点同时操作 放大缩小等,时间范围0001-9980年 定位精确到天 时间轴数据加载格式如下:<?xml version="1.0" encoding="utf-8" ?><data> <event imgUrl="Sample_Photos&qu
阅读全文
利用C# 5 新特性 异步操作UI
摘要:参考文章:http://www.cnblogs.com/mgen/archive/2012/03/10/2389509.htmlusing System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
usi
阅读全文
C# 5新特性详解之一——异步编程 转。。保存一下以后看
摘要:C# 5新特性详解之一——异步编程2012-03-26 13:08|5619次阅读|来源:CSDN【已有35条评论】发表评论关键词:C#|作者:王然|收藏这篇资讯导读:本文详细介绍了C#5的新特性:异步编程、方法调用、Lambda表达式..,供开发者参阅。在即将到来的新的Windows Runtime中更根本地确定任何API都不会运行超过50ms的时间。需要更长时间的操作将会由'kick off this operation'API来代替,不等待运算结果就直接立刻返回。这样做是因为Microsoft希望Windows8 Metro程序能够在即时的触控UI上能够“快速并且流动”,
阅读全文
图片循环播放器。WPF制作 以下为代码
摘要:using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Syst
阅读全文
自定义事件和参数。详细版。。。
摘要:using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Syst
阅读全文
GC 回收WPF 内存 C#通用
摘要:public class FlushMemory { [DllImport("kernel32.dll")] public static extern bool SetProcessWorkingSetSize(IntPtr proc, int min, int max); /// <summary> /// 释放内存 /// </summary> public static void Flush() { GC.Collect(); GC.WaitForPendingFinalizers(); if (Environment.OSVersion.Pl
阅读全文