标签:
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"/>
标签:
原文地址:http://www.cnblogs.com/hanjiaxu/p/4270719.html