C#C
C#2y ago
Mek

✅ How to get value of DatePicker from nested UserControl Avalonia

<!-- in new user view -->
<UserControl xmlns:uc="clr-namespace:MathGame.Views.UserControls;assembly=MathGame">
  <Border>
    <StackPanel>
      <uc:DatePicker />
    </StackPanel>
  </Border>
</UserControl>

<!-- in ./Views/UserControls/DatePicker.axaml -->
<UserControl>
  <DatePicker DayFormat="ddd dd" MonthFormat="MMM MM" />
</UserControl>
in the CreateNewUserView.axaml file, how do I get access to the date selected within the DatePicker with the DatePicker being in a nested UserControl?
Was this page helpful?