0
我想使用依賴屬性代表ICarRepository
實例。在這個實際例子中使用wpf中的依賴屬性
所以我找到了this post和根據acc。答案我與我的例子試圖
public static readonly DependencyProperty RepositoryProperty = DependencyProperty.Register(
null,
typeof(ICarRepository),
typeof(TreassureControl),
**new PropertyMetadata(??????)** what to put here?
);
public ICarRepository Repository
{
get { return (ICarRepository)GetValue(RepositoryProperty); }
set { SetValue(RepositoryProperty, value); }
}
你可以通過'例如接收ICarRepository例如槽xaml'的更清楚了嗎?你想綁定的地方? –