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 = "确定"; ...
随机推荐
- gcc编译选项--转
gcc提供了大量的警告选项,对代码中可能存在的问题提出警告,通常可以使用-Wall来开启以下警告: -Waddress -Warray-bounds (only with -O2) ...
- MIPS Instruction Set
https://www.mips.com/develop/training-courses/mips-basic-training-course/ The MIPS64 Instruction Set ...
- 数据库使用truncate清理非常多表时碰到外键约束时怎么高速解决
问题处理思路: 1. 先将数据库中涉及到外键约束的表置为无效状态 2.待清除全然部表数据后再将外键约束的表置为可用状态 详细实现脚本: declare begin for vv_sql in (SEL ...
- winfrom RichTextBox每行字体的颜色
public static void AppendTextColorful(this RichTextBox rtBox, string text, Color color, bool addNewL ...
- Java-Maven项目引入UEditor图片上传组件jar包类库的5种方式
最近,硬是和百度的UEditor组件杠上了.自己的个人官网项目,很容易就搞定了,公司的项目,尼玛,各种问题.项目多了,环境复杂了,解决问题的方法也得不断调整. 项目用Maven管理jar包,用到了UE ...
- Java中的equals比较,小坑一个
最近工作中,经常需要比较2个对象的值.有个问题经常遇到,就是下面的2种情况. public static void main(String[] args) { Integer a =11; Objec ...
- 使用CentOS7卸载自带jdk安装自己的JDK1.8
不管在什么地方,什么时候,学习是快速提升自己的能力的一种体现!!!!!!!!!!! 关于JDK1.8 与之前的版本相比有哪些变化和新特性我也不在这详细的说明了,毕竟一度娘啥都有了,既然不多说那就直接开 ...
- [搜索]Trie树的实现
trie这种树也被称为线索,搜索树. 正如图 以下是用stl 的map来实现 class trie_item_c { public: trie_item_c(){} trie_item_c(const ...
- 【23.33%】【hdu 5945】Fxx and game
Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Total Submission(s ...
- myeclipse codelive插件关闭
开启这个插件时,当你运行web工程,打开页面会造成一些显示的问题,原因是codelive插件向你的页面代码中注入了一些js代码大概是如下这些 <script>"undefined ...