首页 > 代码库 > 路径转换

路径转换

     前台代码

  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

 

路径转换