我们在ControlTemplate中画了椭圆,应用于Button按钮,但我们Button中有的Content属性,却没有显示出来。因为这里用ControlTemplate重写了Button的样式,所以我们也要在ControlTemplate中增加ContentControl。通过ContentControl中的Content来绑定父容器的Content属性。
相关文章:
我们在ControlTemplate中画了椭圆,应用于Button按钮,但我们Button中有的Content属性,却没有显示出来。因为这里用ControlTemplate重写了Button的样式,所以我们也要在ControlTemplate中增加ContentControl。通过ContentControl中的Content来绑定父容器的Content属性。
相关文章: