The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
Recoginition shapes InkCanvas UWP RRS feed

  • Question

  • Hello:
    I have recogmition pen for shapes where I created a clase.cs, then I pass it to toggeSwitch. The Problem comes when I put on but when I give off I put On out the picture corrected as I can get out solamnete Poneindo On.

    private   void TGRPen_Toggled(object sender, RoutedEventArgs e)
            {
                ToggleSwitch toggleSwitch = sender as ToggleSwitch;
    
               if (toggleSwitch.IsOn == true)
                {
                    recognizeStrokesService?.RecorgnizeStrokes();
                    
                    reconigtionCanvas.Visibility = Visibility.Visible;
                    
    
    
                }
                else
                {
    
                    recognizeStrokesService?.RecorgnizeStrokes();
                    reconigtionCanvas.Visibility = Visibility.Collapsed;
                }
    
            }

    Monday, April 15, 2019 9:39 AM

All replies

  • Hi,

    I could not understand your question. It seems that you are using a toggleSwitch to control the visibility of canvas. But it's not clear what's going on in your words. Could you please explain it more clearly-“The Problem comes when I put on but when I give off I put On out the picture corrected as I can get out solamnete Poneindo On.”?

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 16, 2019 6:55 AM
    Moderator
  • Hello:

    When the ToggleSwitch I put it on and draw an ellipse. When I give off the drawing disappears and when I pulse On returns to the drawing in the shape of ellipse but I can not delete it.

    Tuesday, April 16, 2019 8:02 AM
  • Hello:

    The recognition works by removing the else.

    As I can erase the recognition of pencil

    When the toggleswitch I put on the problem drawing the shape does not work but when it is Off and drawing shape and active ToggleSwitch works
    • Edited by Javier Ra Wednesday, April 17, 2019 1:20 PM more information
    Wednesday, April 17, 2019 11:15 AM
  • Hi,

    Let me confirm first. Now the problem is that when the toggleswitch is on, you could not draw in the canvas ,but if the toggleswitch is off, it works correctly? From your code ,it seems that you will hide the canvas. And in your last reply, you said you moved the else. Do you mean you had moved the code to hide the canvas? 

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 18, 2019 5:02 AM
    Moderator
  • Hello:

    If I put On when drawing by ellipse does not work but when I disconnect and put it back in ON the corrected ellipse comes out, which I have removed else. I can not erase what is done with the recognition of pencil.

    Thursday, April 18, 2019 3:12 PM
  • Hi,

    I still couldn't understand your question well. Do you have any screen shot about the behavior you are saying?

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 22, 2019 8:12 AM
    Moderator
  • Hi:

    When I activate Toggleswitch and drawing for example ellipse does not occur the change, I have to do it with the Toggleswitch off., I can not delete the canvas when I already made recognition of form

    Wednesday, April 24, 2019 10:11 AM
  • Hi,

    I made a simple test code about this. User a toggleswitch to control the visibility of the inkcanvas. But I could not reproduce your problem. Your problem sounds like you put the Visible code in the switch off state.  Have you checked that?

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 25, 2019 7:52 AM
    Moderator
  • Hi:

    When I put on in the Toggleswitch the shapes stay the same

    Monday, April 29, 2019 5:56 PM
  • Hi,

    Could you please show the part of the code for how does the toggleswitch work? You said you had changed the code? What have you done in the toggleswich method?

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 1, 2019 7:21 AM
    Moderator
  • Hi:

     private async void RecoShape_Toggled(object sender, RoutedEventArgs e)
            {
    
               await recognitionService?.RecognizeStrokes();
    
                var toggleSwitch = sender as ToggleSwitch;
    
                if (toggleSwitch != null)
                {
                    if (toggleSwitch.IsOn == true)
                    {
                        
                        reconigtionCanvas.Visibility = Visibility.Visible;
    
                    }
                    
                   
                    
                }
            }

    I have problem with Shape Recognition when activating the Toggleswitch no Shape Recognition occurs but when deactive occurs the recognition in a way


    • Edited by Javier Ra Wednesday, November 27, 2019 4:06 PM error
    Wednesday, November 27, 2019 4:02 PM