CustomControl DependencyProperty #2244
Unanswered
FrancisKoo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The DependencyProperty Label is not been set.When I add two BgLabelControl in MainWindow.xaml.
Here is the code
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> <local:BgLabelControl Background="Red" Label="Hello, World!" /> <local:BgLabelControl Background="green" Label="www, World!" /> </StackPanel>
Here is the link
https://docs.microsoft.com/en-us/windows/apps/winui/winui3/xaml-templated-controls-cppwinrt-winui-3#implement-the-bglabelcontrol-custom-control-class
Expected
the red one show Hello, World!
the green one show www, World!
Beta Was this translation helpful? Give feedback.
All reactions