© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
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 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?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Styling Avalonia DatePicker Control
C#CC# / help
2y ago
❔ Blazor: Get value of nested component
C#CC# / help
3y ago
Accessing Function from Nested UI File - Avalonia
C#CC# / help
2y ago
❔ Avalonia nested ItemsRepeater datatemplates
C#CC# / help
3y ago