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"/>