Interaction and InteractionVoice in MySampleView.xaml.cs

I am new, so please be polite :slight_smile:
I am trying to get IInteractionVoice and IInteraction thisinteraction inside this sample class. Provided by genesys. But struggling with it lots and lots.
Code is here http : //prntscr . com/6z50z3
And lets say I have new method private void ccancel_Click(object sender, RoutedEventArgs e) {IInteraction i = …[here should go some code] ; i.SetAttachedData…}

And what is the problem or question?

Hi,

To get the Interaction you would need to do something like this:

ICase myCase = (Extensions.TryGetValue<string, object>(this.Context as IDictionary<string, object>, “Case”) as ICase);
if (myCase.MainInteraction is IInteractionVoice)
{
IInteractionVoice iv = myCase.MainInteraction as IInteractionVoice;

             }