lilcodelab / Xamarin.Plugin.Calendar

Calendar plugin for Xamarin.Forms
MIT License
260 stars 60 forks source link

[Custom] Can I Binding Command In EventTemplate? #12

Closed tkezyo closed 5 years ago

tkezyo commented 5 years ago

I want click event and navigate to other page,but it's not working. help me pls

<controls:Calendar.EventTemplate>
                <DataTemplate>
                    <Button Command="{Binding OpenDetailPageCommand}" Text="{Binding .} "/>
                </DataTemplate>
</controls:Calendar.EventTemplate>
tkezyo commented 5 years ago
           <controls:Calendar.EventTemplate>
                <DataTemplate>
                    <Button Command="{Binding BindingContext.OpenDetailPageCommand, Source={x:Reference page} }" Text="{Binding .} "/>
                </DataTemplate>
            </controls:Calendar.EventTemplate>
alfredinete commented 4 years ago

i have a external control where i binding my comand but it still doesn't work

whether in my control with static layout recognizers or buttom

does it bind all commands except the command....

How can I get this way to work?

why does it only work with an external button inside the datatemplate?