xamarin.formsgridlabelwordsearch

Xamarin Forms: How to add dragging event for labels? - Word Search Game


I am trying to implement a word search game for my project. I have created the word search letterbox using the grid and label (using this blog). Each letterbox has some words and that words are listed under the letterbox. I need to select the word hidden in the letterbox by dragging the labels. When start dragging the background color changed to orange. If the dragged word is in the words list, change the background color to green. Also, I need to capture the total, right and wrong attempts.

Please watch this video for getting a clear idea. I have also added a sample project here for the reference. I need to do the below things:

  1. Dragging event for labels inside the grid.

  2. Change the background color to orange(when starts dragging) and green(when the word is in the list).

  3. A tickmark for found words.

  4. Capture the total attempts, wrong attempts, and correct attempts.


Solution

  • Implemented the word search game with the clicked feature of the button. When using the clicked feature we need to check the pattern is correct or not. I have uploaded a sample project here.

    The sample contains the following features:

    1. Letterbox with words arranged from left to right, right to left, top to bottom, bottom to top, or diagonally. Also, hidden words are listed on the bottom of the page.
    2. Changing the background color to orange, when clicking a letter. If we click the letters in any of the above mechanisms, it will continue changing the background color to orange.
    3. When the word is found the background color is changing to green. If we change the pattern, I will remove the background color.
    4. Changing the color and adding a tick mark for found words.
    5. When all the words are found, added a restart option.

    References:

    https://github.com/neetfreek/word-search-generator/blob/master/WordSearch/WordSearch.cs

    Xamarin Forms: How to add background color for clicked button inside grid(Word Search Game)

    Xamarin Forms: Grid button UI breaks when click restart button