windows-phone-7 - 如何从代码后面调用 iValueConverter?

标签 windows-phone-7 data-binding

我有一个类 MinutesToHourMinutesConverter : IValueConverter,它以 HH:mm 格式转换分钟数,并且在数据绑定(bind)中运行良好。

为了避免重复代码,我想在代码的其他部分重用它,我该怎么做?

最佳答案

 new MinutesToHourMinutesConverter().Convert(...)

关于windows-phone-7 - 如何从代码后面调用 iValueConverter?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8344708/

相关文章:

wpf - 暂停对绑定(bind) ObservableCollection<T> 的 DataGrid 的更新

c# - 将 DataRow 绑定(bind)到 TextBox

android - 如何设置android :inputType using databinding

c# - 绑定(bind)到 Properties.Settings.Default.myString 的文本框文本不会更新 myString

c# - 如何使用 LINQ to XML 查询日期时间值?

image - 为什么 XAML 图像源属性包含 "/MyApp;component"?

c# - wp7 上的折线图

html - Windows Phone 中 <span> 标签前出现的缩进

c# - 如何以编程方式将文本框大小分配给自动?

c# - 绑定(bind)Command时绑定(bind)IsEnabled是可选的吗?