views:

13

answers:

0

So heres the situation, i have a listbox that has a itemcontainerstyle with a template that contains a usercontrol. Inside this usercontrol is:

        <Grid Name="Label" MouseLeftButtonDown="Label_MouseLeftButtonDown" >
            <TextBlock Name="Text" />
        </Grid>
    </Border>
    <Grid Name="Editor" Visibility="Collapsed" >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Button x:Name="submit"/>
        <TextBox Name="Input" />
        <Button x:Name="cancel"/>

    </Grid>

So when you click on the label you will go into edit mode (label: collapsed, editor: visible) and what i want to do is when i lose focus from the listboxitem for it to go back to none edit mode. So my problem is that i cant seem to call LostFocus on, the LayoutRoot, the usercontrol, or the ListBoxItem. The only thing that i can set LostFocus on is the Textbox.