У меня есть пользовательский элемент управления, свойство Frame в качестве свойства зависимости
public partial class NavigationBar : UserControl
{
public NavigationBar()
{
this.InitializeComponent();
}
public Frame NavigationFrame
{
get { return (Frame)GetValue(NavigationFrameProperty); }
set { SetValue(NavigationFrameProperty, value); }
}
// Using a DependencyProperty as the backing store for NavigationFrame. This enables animation, styling, binding, etc...
public static readonly DependencyProperty NavigationFrameProperty =
DependencyProperty.Register("NavigationFrame", typeof(Frame), typeof(NavigationBar), new UIPropertyMetadata());
}
Использование кода контроля пользователя:
<userControls:NavigationBar NavigationFrame="{Binding ElementName=masterPage, Path=frameNavigations}" />
<Frame x:Name="frameNavigations"/>
Почему свойство зависимостей NavigationFrame после загрузки остается пустым?
Заранее спасибо