<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的使用的更多相关文章

  1. WPF:获取DataGrid控件单元格DataGridCell

    转载:http://blog.csdn.net/jhqin/article/details/7645357 /* ------------------------------------------- ...

  2. 遍历WPF DataGrid单元格

    using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Media; ...

  3. WPF 获得DataGridRow和 DataGridCell的方法

    原文:WPF 获得DataGridRow和 DataGridCell的方法 原文地址 简介 在WPF中,DataGrid控件并没有提供访问其DataGridRow或者DataGridCell的方法. ...

  4. DataGrid 得到DataGridRow 和DataGridColumn

    /* ---------------------------------------------------------- 文件名称:DataGridPlus.cs 作者:秦建辉 MSN:splash ...

  5. 使用copydata实现进程之间数据传递

    Winform to Winfrom==> 发送端==> using System; using System.Runtime.InteropServices; namespace Cop ...

  6. WPF使用X:Static做多语言支持

    让程序支持多语言,一般把需要显示的字符串保存在一个资源类的static属性中. <!--[if !supportLists]--> <!--[endif]--> 微软的WPF程 ...

  7. WPF error: does not contain a static 'Main' method suitable for an entry point

    WPF error: does not contain a static &apos;Main&apos; method suitable for an entry point doe ...

  8. 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”错误,   解决方 ...

  9. WPF扩展标记X:STATIC

    原文:WPF扩展标记X:STATIC public class XStaic     {         public static string Content = "确定"; ...

随机推荐

  1. QAtomicInt支持四种类型的操作,Relaxed、Acquired、Release、Ordered

    Memory Ordering   Background 很久很久很久以前,CPU忠厚老实,一条一条指令的执行我们给它的程序,规规矩矩的进行计算和内存的存取. 很久很久以前, CPU学会了Out-Of ...

  2. php实现 合唱队形(算法想清楚在动)

    php实现  合唱队形(算法想清楚在动) 一.总结 一句话总结:写一个最长递增子序列的函数,正反两遍扫一下就好.写函数这样不容易错.这个好像可以用二分来优化. 1.算法题怎么提高正确率和节约时间? 算 ...

  3. [Angular] Using ngOnChanges lifeCycle hook to break object reference

    What could be the issue, for example we have two list: Parent component: @Component({ selector: 'pas ...

  4. [Recompose] When nesting affects Style

    In CSS we use the descendant selector to style elements based on their nesting. Thankfully in React ...

  5. JM-2 jQuery Mobile的使用(多看学习视频)

    JM-2 jQuery Mobile的使用(多看学习视频) 一.总结 一句话总结:前端框架的使用全都一个样,本质都是css和js,引入文件也是这些.使用都是看手册,超简单. 1.jQuery Mobi ...

  6. web项目的WEB-INF目录

    WEB-INF是Java的WEB应用的安全目录.所谓安全就是客户端无法访问,只有服务端可以访问的目录. 如果想在页面中直接访问其中的文件,必须通过web.xml文件对要访问的文件进行相应映射才能访问. ...

  7. Oracle数据库中的几个名字及监听的配置问题

    学习数据库的时候,由于数据库只建了一个库,而且只是本机访问,所以没有对listener.ora与tnsname.ora这两个文件进行过多设置,但是实际中要区分客户端与服务器端,相互之间的访问就存在微妙 ...

  8. window.load和ready的差别

    1.运行时机: window.onload:必须等待网页所有加在完成(包含图片等),然后再运行包裹代码 $(document).ready():仅仅须要等待网页中的DOM结构载入完成.就能运行包裹的代 ...

  9. 颜色转换:#hhhfff->UIColor (MHHexColoring)

    MHHexColoring为开发者快速获取想要的十六进制颜色(Hex Color) 查找16进制色码的网站:http://www.color-hex.com // 版权属于原作者 MHHexColor ...

  10. 学习鸟哥的Linux私房菜笔记(11)——系统监视1

    一.了解系统状况 uname:显示系统信息 hostname:显示主机名 last:列出最近的用户登录 lastlog:列出每一个用户的最近登录情况 free:显示内存使用状况 还可以使用vmstat ...