<UserControl x:Class="绑定.绑定Source"
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.com/expression/blend/2008"
xmlns:local="clr-namespace:绑定"
mc:Ignorable="d"
d:DesignHeight="" d:DesignWidth="">
<Grid>
<Button Content="{Binding Source={x:Static local:BingdingStaticPath.BindingStaticProperty}}"></Button>
</Grid>
</UserControl>
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.Navigation;
using System.Windows.Shapes;
using System.ComponentModel; namespace 绑定
{
/// <summary>
/// 绑定Source.xaml 的交互逻辑
/// </summary>
public partial class 绑定Source : UserControl
{
public 绑定Source()
{
InitializeComponent();
}
} public static class BingdingStaticPath
{
private static string _bindingStaticProperty;
public static String BindingStaticProperty
{
set
{
_bindingStaticProperty = value;
}
get
{
return _bindingStaticProperty;
}
}
static BingdingStaticPath()
{
_bindingStaticProperty = "dog";
}
}
}

数据绑定—Source(绑定到静态类的静态属性)的更多相关文章

  1. Silverlight数据绑定之 绑定一个int类型的属性

    还就真心不会啊! 在类FunctionPanel中作如下定义: /// <summary> /// 鼠标状态 属性 /// </summary> public Dependen ...

  2. WPFS数据绑定(要是后台类对象的属性值发生改变,通知在“client界面与之绑定的控件值”也发生改变须要实现INotitypropertyChanged接口)

    WPFS数据绑定(要是后台类对象的属性值发生改变,通知在"client界面与之绑定的控件值"也发生改变须要实现INotitypropertyChanged接口) MainWindo ...

  3. win10 uwp 绑定静态属性

    Jasoon 大神问,如何绑定静态属性. 我们经常有静态属性,那么我们如何绑定 假如我们的ViewModel有一个静态属性 public static string CVTE { set; get; ...

  4. Javascript 面向对象(共有方法,私有方法,特权方法,静态属性和方法,静态类)示例讲解

    一,私有属性和方法 私有方法:私有方法本身是可以访问类内部的所有属性(即私有属性和公有属性),但是私有方法是不可以在类的外部被调用. <script> /* * 私有方法:私有方法本身是可 ...

  5. WPF 绑定到静态属性(4.5)

    1. 声明静态事件 /// <summary> /// 静态属性通知 /// </summary> public static event EventHandler<Pr ...

  6. JS面向对象(3) -- Object类,静态属性,闭包,私有属性, call和apply的使用,继承的三种实现方法

    相关链接: JS面向对象(1) -- 简介,入门,系统常用类,自定义类,constructor,typeof,instanceof,对象在内存中的表现形式 JS面向对象(2) -- this的使用,对 ...

  7. day25、 静态属性、类方法、静态方法、组合、继承、

    一. 静态属性.类方法.静态方法 1.1静态属性 class Room: def __init__(self,name,owner,width,length): self.name=name self ...

  8. js公有、私有、静态属性和方法的区别

          现下,javascript大行其道,对于网站开发人员来说,javascript是必需掌据的一门语言,但随着jquery等框架的流行和使用,许多人对于原生javascript缺乏深入的理解, ...

  9. java中静态属性和和静态方法的继承问题 以及多态的实质

    首先结论是:java中静态属性和和静态方法可以被继承,但是没有被重写(overwrite)而是被隐藏. 静态方法和属性是属于类的,调用的时候直接通过类名.方法名完成的,不需继承机制就可以调用如果子类里 ...

随机推荐

  1. POJ 1258 Agri-Net(Prim算法)

    题意:n个农场,求把所有农场连接起来所需要最短的距离. 思路:prim算法 课本代码: //prim算法 #include<iostream> #include<stdio.h> ...

  2. codeforces 633A A. Ebony and Ivory(暴力)

    A. Ebony and Ivory time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  3. JNI简易入门

    JNI简介 JNI(Java Native Interface)是JDK的一部分,提供了若干API实现了Java和其他语言的通信(主要是C/C++).JNI主要用于以下场景: 贴近硬件底层的功能,Ja ...

  4. 使用WindowsAPI获取录音音频的方法

    这篇文章主要介绍了使用WindowsAPI获取录音音频的方法,非常实用的功能,需要的朋友可以参考下 本文实例介绍了使用winmm.h进行音频流的获取的方法,具体步骤如下: 一.首先需要包含以下引用对象 ...

  5. ACdream1430SETI(后缀自动机)

    问题: Amateur astronomers Tom and Bob try to find radio broadcasts of extraterrestrial civilizations i ...

  6. dbcc练习1

    dbcc tranceon(2588,3604) dbcc ind() dbcc page()

  7. 基于C#的数据库文件管理助手2018-09-02

    数据库文件管理助手说明 目录 一. 数据库的文件导出2 1. web格式 2 2. winform格式 5 3. 二进制格式 5 二. 文件批量工具8 1. 文件批量改名GUID 8 2. 文件批量下 ...

  8. POJ1112 Team Them Up!

    Team them up! Input file teams.in Output file teams.out Your task is to divide a number of persons i ...

  9. SparkWriteToHFile

    1. HFile的LoadIncrement卡住 原来是因为权限,我一直以为,load函数之后是要删除文件的,但是hdfs://slave1:8020/test/info文件夹所有的是只读权限,而且考 ...

  10. Linux使用tcpdump抓取网络数据包示例

    tcpdump是Linux命令行下常用的的一个抓包工具,记录一下平时常用的方式,测试机器系统是ubuntu 12.04. tcpdump的命令格式 tcpdump的参数众多,通过man tcpdump ...