Binding command to button under RadTabControl.AdditionalContent not working

0 Answers 60 Views
Buttons TabControl
ofir
Top achievements
Rank 1
ofir asked on 15 Mar 2023, 06:42 AM

I have the following

For some reason the binding to MyCommand not triggering at all at my view model
Im using MvvmLight RelayCommand if it matters everywhere in my app

P.s 
I tried to change Button to RadButton and the result are the same

<UserControl>
   <Grid>
       <telerik:RadTabControl>
         <telerik:RadTabControl.AdditionalContent>
              <StackPanel Orientation="horizontal"
                                    DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AnsectorType={x:Type UserControl}}, Path=DataContext}">
                      <Button Command="{Binding Path=MyCommand}">
                      </Button>
              </StackPanel>
        </telerik:RadTabControl.AdditionalContent>
       <telerik:RadTabControl.Items>
             <telerik:RadItem>
                  <!-- Here everything works just fine -->
              </telerik:RadItem>
       </telerik:RadTabControl.Items>
    </telerik:RadTabControl>
   </Grid>
</UserControl>


Martin Ivanov
Telerik team
commented on 16 Mar 2023, 02:22 PM

I've tested this and the data binding works properly. You can check the attached and see if I am missing anything.

No answers yet. Maybe you can help?

Tags
Buttons TabControl
Asked by
ofir
Top achievements
Rank 1
Share this question
or