Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AppBarButton][Material] DataContext is not propagated to AppBarButton's Content when using the MaterialAppBarButton style #336

Open
kazo0 opened this issue Feb 1, 2022 · 0 comments
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification.

Comments

@kazo0
Copy link
Contributor

kazo0 commented Feb 1, 2022

Current behavior

On iOS and Android, having a a ViewModel as the DataContext of the current Page and the following XAML results in a blank AppBarButton. The DataContext is not passed along to the Content. Removing the Ripple control from the template of the MaterialAppBarButton style results in the TextBlock displaying the proper value.

<AppBarButton Style="{StaticResource MaterialAppBarButton}">
    <TextBlock Foreground="Black"
                Text="{Binding ViewModelName}" />
</AppBarButton>

Expected behavior

TextBlock should have the proper DataContext and should display as the Content of the AppBarButton

@kazo0 kazo0 added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification. labels Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification.
Projects
None yet
Development

No branches or pull requests

1 participant