码迷,mamicode.com
首页 > 其他好文 > 详细

路径转换

时间:2016-09-17 10:39:49      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:

     前台代码

  xmlns:wpfApplication6="clr-namespace:WpfFormControl"

  <Button Content="{Binding Source={x:Static wpfApplication6:Title.aa},Converter={StaticResource ss}}"/>

后台

技术分享
    /// <summary>
    /// Title.xaml 的交互逻辑
    /// </summary>
    public partial class Title : Window
    {
        public static string aa = "dfdf";

        public Title()
        {
            InitializeComponent();
            this.pswa.Content = Properties.Resources.psw;

        }
    }
    public class aConvert : IValueConverter
    {

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return (string)value + ":d---fd";
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
View Code

 

路径转换

标签:

原文地址:http://www.cnblogs.com/lizhenlin/p/5877955.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!