【发布时间】:2014-03-10 02:46:23
【问题描述】:
值或参数可以传递给 WPF 用户控件吗?我正在使用 MVVM 模式。
<local:SampleUserControlView Forecolor="{Binding ForeColor}"/>
在哪里
ForeColor 是 Viewmodel 中 Type Color 或 Brush 的属性 托管 SampleUserControl 视图的窗口。
顺便问一下,属性的类型应该是Color还是Brush?
【问题讨论】: