How to write on InkPresenter in Silverlight For Windows Embeddeded?

78 views Asked by At

I want to make a doodle sort of control on an embedded device and this is what I’ve done so far:

Placed an InkPresenter control (Home_Ink) and these are its events:

Home_Ink_MouseLeftButtonDown:

  m_pHome_Ink->CaptureMouse(retValue);
  pApplication->CreateObject(&s);
  pApplication->CreateObject(&pStylusPoints);
  pApplication->CreateObject(&pDrawingAttributes);

  s->SetStylusPoints(pArgs->pStylusPoints);

  pDrawingAttributes->SetHeight(pencilWidth);
  pDrawingAttributes->SetWidth(pencilWidth);
  pDrawingAttributes->SetColor(pencilColor);
  s->SetDrawingAttributes(pDrawingAttributes);

  m_pHome_Ink->GetStrokes(&pStrokes);
  pStrokes->Add(s,NULL);

Home_Ink_MouseLeftButtonUp :

  s=NULL;
  m_pHome_Ink->ReleaseMouseCapture();

Home_Ink_MouseMove :

  if(s!=NULL)
  {
        s->SetStylusPoints(pArgs->pStylusPoints);
        pStrokes->Add(s,NULL);
  }

There are no build errors and the application is running. But nothing is getting drawn on the inkpresenter. What am I doing wrong??

0

There are 0 answers