【发布时间】:2014-08-19 09:31:02
【问题描述】:
伙计们,如果我的 XAML 中有 2 个数字上下颠倒,就像这样
<Input:SfNumericUpDown Grid.Column="1" Margin="10,0,10,0" Value="{Binding CompoundQty}" ValueChanged="SfNumericUpDown_ValueChanged"/>
<Input:SfNumericUpDown Grid.Column="4" Margin="10,0,10,0" Value="{Binding ResultQty}" Tag="{Binding ItemID}" />
我希望根据第一个 numericupdown 值更改第二个 numericupdown 值。 我试着把它放在后面的代码中。
private void SfNumericUpDown_ValueChanged(object sender, Syncfusion.UI.Xaml.Controls.Input.ValueChangedEventArgs e)
{
var numCompoundQty = (SfNumericUpDown)sender;
foreach(var row in _entityEdited.ListCompoundDisplay)
{
if(row.ItemID == Convert.ToInt32(numCompoundQty.Tag))
{
row.CompoundQty = Convert.ToDecimal(numCompoundQty.Value);
row.ResultQty = Convert.ToDecimal(numDispenseQty.Value) * row.CompoundQty;
break;
}
}
}
但它不起作用,你们能帮我解决什么问题吗?
【问题讨论】:
-
您是否提高了属性的正确 notifypropertychanged?
-
我没有使用任何 notifypropertychanged 函数先生...
标签: c# silverlight xaml windows-phone-8