This is a migrated thread and some comments may be shown as answers.

Command

1 Answer 108 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
IRoman91
Top achievements
Rank 1
IRoman91 asked on 04 Nov 2013, 07:57 AM

Hi!

 

I'm using a MVVM Light for my WP8 application. So when an event from RadTextBox raised, i need to send command to the ViewModel.  I tried the solution below, but it doesn't work. Can you give another approach?


View:
<telerikPrimitives:RadTextBox x:Name="TestBox" Header="Test">
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="LostFocus"  SourceName="TestBox">
            <i:InvokeCommandAction Command="{Binding BoxLostFocusCommand}" />
        </i:EventTrigger>
    </i:Interaction.Triggers>
</telerikPrimitives:RadTextBox>

ViewModel:

public RelayCommand BoxLostFocusCommand
    {
        get; set;
    }
 
public TestViewModel()
    {
        InitializeCommand();
    }
 
public void InitializeCommand()
    {
        BoxLostFocusCommand = new RelayCommand(() =>
        {
 
        });
    }

1 Answer, 1 is accepted

Sort by
0
IRoman91
Top achievements
Rank 1
answered on 04 Nov 2013, 08:12 AM

I found my mistake! Sorry for disturbing

Tags
TextBox
Asked by
IRoman91
Top achievements
Rank 1
Answers by
IRoman91
Top achievements
Rank 1
Share this question
or