如何绑定动态资源并将其发送到我的转换器

时间:2018-03-01 13:17:34

标签: wpf converter

所以我有这个:

$database = JFactory::getDBO();
$database->setQuery("SELECT COUNT(`SubmissionId`) FROM #__rsform_submission_values WHERE (`FieldName`='Participate' AND `FieldValue`='Ja') AND (`FieldValue`='Reinier de Graaf Gasthuis, Delft')");
$formLayout = "Reinier de Graaf Gasthuis, Delft: <strong>".$database->loadResult()."</strong>";

<system:Int32 x:Key="ListViewPacketManipulationOptionsComboBoxSelectedIndex">0</system:Int32> Value> 0时,我想要TextBox IsEnables=True

public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
    return (int)value > 0;
}

我的TextBox

<TextBox x:Name="tbHeaderOriginValue"   
         IsEnabled="{DynamicResource ListViewPacketManipulationOptionsComboBoxSelectedIndex}"/>

目前我没有找到任何方法来添加Converter

0 个答案:

没有答案