DataGrid is not work in GridLayout

Jul 10, 2013 at 2:54 PM
I have a DataGrid with a column containing an edit button as shown below:
<UserControl x:Class="Recepcao.UI.Pages.Cadastros.GrdFuncionario"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d">
    <StackPanel>
        <DataGrid IsReadOnly="False" RowBackground="White" AlternatingRowBackground="LightBlue" 
                  ItemsSource="{Binding}" AutoGenerateColumns="False" Name="GridFuncionario"  
                  HorizontalAlignment="Stretch" VerticalAlignment="Top">
            <DataGrid.Columns>
                <DataGridTextColumn Width="0.25*" Binding="{Binding Path=Nome, Mode=TwoWay}" Header="Nome" />
                <DataGridTextColumn Width="0.25*" Binding="{Binding Path=Email, Mode=TwoWay}" Header="Email" />
                <DataGridTextColumn Width="0.25*" Binding="{Binding Path=Login, Mode=TwoWay}" Header="Usuário" />
                <DataGridTemplateColumn Width="0.25*" Header="Image" IsReadOnly="True">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Button Content="Editar" Name="btnEditar" Click="btnEditar_Click" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
            </DataGrid.Columns>
        </DataGrid>
    </StackPanel>
</UserControl>
But he runs into new UserControl as below:
<UserControl x:Class="Recepcao.UI.Pages.Configuracoes.Funcionarios.FrmIndex"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d"
             d:DesignHeight="600" d:DesignWidth="600">
    <!--<Canvas>-->
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="65"/>
        </Grid.RowDefinitions>
        <mui:ModernTab Layout="Tab" SelectedSource="/UI/Pages/Cadastros/GrdFuncionario.xaml" Grid.Row="0" >
            <mui:ModernTab.Links>
                <mui:Link DisplayName="Funcionários Cadastrados" Source="/UI/Pages/Cadastros/GrdFuncionario.xaml" />
            </mui:ModernTab.Links>
        </mui:ModernTab>
        <TextBlock></TextBlock>
        <Button Grid.Row="1" x:Name="btnNovo" ToolTip="Novo Funcionário" HorizontalAlignment="Right" Height="60" Style="{DynamicResource BtnNovo}" VerticalAlignment="Top" Width="60" Click="Button_Click_1"/>
    </Grid>
    <!--</Canvas>-->
</UserControl>
DataGrid does not work in this case, I can not click the edit button of his lines, or to order, nothing works, it's like the DataGrid was disabled. If I remove the GridLayout and use the Canvas Layout DataGrid works perfectly. Someone could tell me where is the problem?