I have a custom control myCustomControl.Xaml
<UserControl.Resources>
...
</UserControl.Resources>
<ComboBox Name="myCustomComboBoxParent"
someId = "{Binding customId}"
.../>
And a cs file myCustomControl.xaml.cs
public static readonly DependencyProperty customIdProperty = DependencyProperty.Register(
nameof(customIdProperty), typeof(string), typeof(myClass),
new FrameworkPropertyMetadata(
"", FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
public string customId
{
get { return (string)GetValue(customIdProperty); }
set { SetValue(customIdProperty, value); }
}
And then I have mainPage.xaml where I set customId
<local:customComboBox x:Name="myCustomComboBoxChild1" customId = "someIdToBeSended" .../>
I dont understand why is my customId not send from mainPage.xaml to myCustromControl.xaml? What I am doing wrong? (ComboBox has no id)