Как я могу связаться с свойством контента управления контентом? public class CustomControl
{
// Dependency Properties
public int MyProperty
{
get { return (int)GetValue(MyPropertyProperty); }
set { SetValue(MyPropertyProperty, value); }
}
// Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
public static readonly DependencyProperty MyPropertyProperty =
DependencyProperty.Register("MyProperty", typeof(int), typeof(MainViewModel), new PropertyMetadata(0));
}
< /code>
В ViewModel я создал свойство типа этого пользовательского элемента управления: < /p>
public CustomControl CustomControl { get; set; }
< /code>
view я связываю это свойство с управлением контентом: < /p>
< /code>
Теперь как я могу связать свой свойство контента? < /p>
Подробнее здесь: https://stackoverflow.com/questions/152 ... t-property