WPF x:static的使用
<Window x:Class="XamlTest.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:XamlTest"
Title="Window1" Height="300" Width="300">
<Grid>
<StackPanel>
<TextBox Text="{x:Static local:Window1.title}"></TextBox>
</StackPanel>
</Grid>
</Window>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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 System.Windows.Shapes;
namespace XamlTest
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Window1 : Window
{
public static string title = "wo de title";
public Window1()
{
InitializeComponent();
}
}
}
WPF x:static的使用的更多相关文章
- WPF:获取DataGrid控件单元格DataGridCell
转载:http://blog.csdn.net/jhqin/article/details/7645357 /* ------------------------------------------- ...
- 遍历WPF DataGrid单元格
using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Media; ...
- WPF 获得DataGridRow和 DataGridCell的方法
原文:WPF 获得DataGridRow和 DataGridCell的方法 原文地址 简介 在WPF中,DataGrid控件并没有提供访问其DataGridRow或者DataGridCell的方法. ...
- DataGrid 得到DataGridRow 和DataGridColumn
/* ---------------------------------------------------------- 文件名称:DataGridPlus.cs 作者:秦建辉 MSN:splash ...
- 使用copydata实现进程之间数据传递
Winform to Winfrom==> 发送端==> using System; using System.Runtime.InteropServices; namespace Cop ...
- WPF使用X:Static做多语言支持
让程序支持多语言,一般把需要显示的字符串保存在一个资源类的static属性中. <!--[if !supportLists]--> <!--[endif]--> 微软的WPF程 ...
- WPF error: does not contain a static 'Main' method suitable for an entry point
WPF error: does not contain a static 'Main' method suitable for an entry point doe ...
- WPF开发“Program '*' does not contain a static 'Main' method suitable for an entry point”错误
WPF项目编译时出现“Program '*' does not contain a static 'Main' method suitable for an entry point”错误, 解决方 ...
- WPF扩展标记X:STATIC
原文:WPF扩展标记X:STATIC public class XStaic { public static string Content = "确定"; ...
随机推荐
- RMAN之一:快速入门 分类: H2_ORACLE 2014-02-17 16:11 689人阅读 评论(0) 收藏
1.数据导出基础 (1)创建datapump导出文件的目录对象并为相应用户授予权限. 出于安全考虑,不允许oracle用户直接在OS上进行文件的操作,而应通过directory对象指定. SQL> ...
- J2EE&JavaEE概述
来源 Sun公司在1998年发表JDK1.2版本的时候, 使用了新名称Java 2 Platform,即"Java2平台",修改后的JDK称为Java 2 Platform Sof ...
- Android MediaScanner使用简单介绍
1. 运行扫描 仅仅有系统开机的时候才会运行MediaScanner,其他情景下须要手动运行扫描(拍摄,下载等). 手动运行扫描的方法是发送MediaScanner广播: 1.1 扫描指定文件: In ...
- Deepin系统更新apt-get源
1.复制原文件备份sudo cp /etc/apt/source.list /etc/apt/source.list.bak2.编辑源列表文件sudo vim /etc/apt/source.list ...
- 【codeforces 757A】Gotta Catch Em' All!
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...
- 【codeforces 750E】New Year and Old Subsequence
time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...
- OpenGL学习一
作者:朱金灿 来源:http://blog.csdn.net/clever101 回家计划学习OpenGL开发.没有开发机子,用的是别人的笔记本,不想装庞大的VS,于是选择小巧一点的codeblock ...
- WPF随笔(九)--使用路径动画模拟管道流体流向
原文:WPF随笔(九)--使用路径动画模拟管道流体流向 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/lordwish/article/detail ...
- 机房重构所遇问题"未能载入文件或程序集“DAL”或它的某一个依赖项。系统找不到指定的文件"的解决的方法集锦
敲七层登录的时候.忽然间认为敲三层搞清的思路瞬间又凌乱了.花了一天的时间边敲边梳理,最终整完了,执行的时候弹出了这种错误:未能载入文件或程序集"DAL"或它的某一个依赖项. 系统找 ...
- spring-boot-sample-web-jsp
Pom文件需要配置的: <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl&l ...