winfwu

导航

2013年2月25日 #

WPF 加载exe执行文件

摘要: System.Diagnostics.Process.Start(@"文件绝对路径"); 阅读全文

posted @ 2013-02-25 18:18 winfwu 阅读(308) 评论(0) 推荐(0) 编辑

WPF SurfaceListBox SelectionChanged事件分析

摘要: 图片预览:xmal代码区:<s:SurfaceWindow x:Class="Qv2._0.SurfaceWindow1" 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" Title="Qv2._0&quo 阅读全文

posted @ 2013-02-25 17:15 winfwu 阅读(927) 评论(0) 推荐(0) 编辑

2013年2月20日 #

WPF LibraryBar去背景色

摘要: 图片预览:<s:SurfaceWindow x:Class="SurfaceApplication2.SurfaceWindow1" 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" Title="Surfa 阅读全文

posted @ 2013-02-20 15:10 winfwu 阅读(362) 评论(0) 推荐(0) 编辑

WPF SurfaceListbox 循环事件

摘要: 截图:(1)生成项目打开vs2010,创建一个surface Application工程。进入ContinuousList作为项目名称在SurfaceWindow1.xaml文件,添加一个数据绑定SurfaceListBox控制网格控件模板的一部分。为SurfaceListBox创建一个模板(Template)。当您完成操作之后,SurfaceWindow1.xaml文件的应用程序应该包含以下代码。<s:SurfaceWindow x:Class="ContinuousList.SurfaceWindow1" xmlns="http://schemas.mi 阅读全文

posted @ 2013-02-20 11:23 winfwu 阅读(802) 评论(1) 推荐(0) 编辑

2013年2月18日 #

WPF Style设置的二种方法

摘要: 效果如下:案例一描述:TargetType 设置所有TextBlock样式 <s:SurfaceWindow.Resources> <Style TargetType="{x:Type TextBlock}"> <Setter Property="FontFamily" Value="Segoe Black" /> <Setter Property="HorizontalAlignment" Value="Center" /> <Setter 阅读全文

posted @ 2013-02-18 16:40 winfwu 阅读(2341) 评论(0) 推荐(0) 编辑

WPF DataTemplate 应用之一(初级Window.Resources应用)

摘要: 效果图:<Window.Resources> <DataTemplate x:Key="myTaskTemplate"> <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> <TextBlock Text="c# " Width="80" Background="Red"/> <TextBlock Text="Java &quo 阅读全文

posted @ 2013-02-18 15:23 winfwu 阅读(512) 评论(0) 推荐(1) 编辑

WPF SurfaceListbox拖拽事件 之一(SurfaceListbox To SurfaceListbox篇)

摘要: 效果图:(1) DataItem类的用于创建项目SurfaceListBox控制。它有两个属性:Name:Item名CanDrop: 指定的项目是否可以删除目标控制public class DataItem { private string name; private bool canDrop; public string Name { get { return name; } } public bool CanDrop { get { return canDrop; } } public DataItem(string name, bool canDrop) { this.name = na 阅读全文

posted @ 2013-02-18 13:55 winfwu 阅读(1236) 评论(0) 推荐(0) 编辑

2013年1月21日 #

WPF c#实现窗口全屏

摘要: 1.xaml代码如下在<window>中添加Loaded="Window_Loaded"2.C#代码如下private void Window_Loaded(object sender, RoutedEventArgs e) { // 设置全屏 this.WindowState = System.Windows.WindowState.Normal; this.WindowStyle = System.Windows.WindowStyle.None; this.ResizeMode = System.Wi... 阅读全文

posted @ 2013-01-21 17:39 winfwu 阅读(1058) 评论(0) 推荐(0) 编辑

2013年1月19日 #

WPF 主窗口调用UserControl

摘要: 1.新建一个UserControl1.xmal<UserControl x:Class="SurfaceApplication5.UserControl1" 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-compatibili 阅读全文

posted @ 2013-01-19 14:13 winfwu 阅读(2454) 评论(0) 推荐(0) 编辑

2013年1月18日 #

WPF 选择文件,文件夹生成路径

摘要: 查找文件路径 private void stackPanel1_Click(object sender, EventArgs e) { //查找文件路径 OpenFileDialog d = new OpenFileDialog(); if (d.ShowDialog() == true) // Result could be true, false, or null folderName = d.FileName; textBox1.Text = folderName; }查找文件夹路径必须手动加载 System.Windows.Forms.dll浏览添加:C:\Program Files. 阅读全文

posted @ 2013-01-18 15:56 winfwu 阅读(5087) 评论(0) 推荐(0) 编辑