1、model
class JX_Unit
{
public enum SumUnit
{
KW = 1,
L = 2,
Kt = 3,
}
}
2、viewModel
public string waterUnit {
get { return JX_Unit.SumUnit.Kt.ToString();
}
set { waterUnit = value; }
}
3、view
<TextBlock Text="{Binding waterUnit}" FontSize="15"/>
时间: 2024-11-05 13:37:54