Hi, try this little demo:
MainPage:
<Page
x:Class="UWP10App1VB.Page20"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UWP10App1VB"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<local:Page20UC1>
<local:Page20UC1.Sides>
<local:Window019Type>Road</local:Window019Type>
<local:Window019Type>Track</local:Window019Type>
<local:Window019Type>None</local:Window019Type>
</local:Page20UC1.Sides>
</local:Page20UC1>
</Grid>
</Page>
XAML UserControl:
<UserControl
x:Class="UWP10App1VB.Page20UC1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UWP10App1VB"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<Grid x:Name="grd">
<ListBox ItemsSource="{Binding Sides}"/>
</Grid>
</UserControl>
CodeBehind UserControl and Enum:
Public NotInheritable Class Page20UC1
Inherits UserControl
Public Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
grd.DataContext = Me
End Sub
Public Shared ReadOnly SidesProperty As DependencyProperty =
DependencyProperty.RegisterAttached("Sides", GetType(List(Of Window019Type)),
GetType(Page20UC1), New PropertyMetadata(New List(Of Window019Type), AddressOf OnSidesChanged))
Public Shared Function GetSides(obj As DependencyObject) As List(Of Window019Type)
Return CType(obj.GetValue(SidesProperty), List(Of Window019Type))
End Function
Public Shared Sub SetSides(obj As DependencyObject, value As List(Of Window019Type))
obj.SetValue(SidesProperty, value)
End Sub
Private Shared Sub OnSidesChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
Debug.Print("OnSidesChanged")
End Sub
End Class
Public Enum Window019Type
Road
Track
None
End Enum
Result: