Stack Exchange
A name of object is defined in .XAML, but cannot be recognized is .fs
A name of object is defined in .XAML, but cannot be recognized in .fs.
Please comment how to troubleshoot the problem.
Error message encountered
FS0039: the value, namespace, type, module 'myMap' is not defined 

MainPage.xaml
 <controls:myMainpageMap x:Name="myMap"
                             Grid.Row="0"
                             IsShowingUser="true"
                             MapType="Street" />

MainPage.xaml.fs
 FS0039: the value, namespace, type, module 'myMap' is not defined.
 myMap.MoveToRegion( ......

UPATE(.fs class declaration also along with namespace)
namespace AwesomeApp.Pages

open Xamarin.Forms
open Xamarin.Forms.Xaml

type MainPage() =
    inherit ContentPage()
    let _ = base.LoadFromXaml(typeof<MainPage>)
    
    override this.OnAppearing() =
        base.OnAppearing()
        myMap.MoveToRegion( ...... )


According to Charles Petzold, I found a solution to solve the problem
override this.OnAppearing() =
    base.OnAppearing()
    // get references to the object in the XAML file that have x:Name** attributes:
    let myMap = base.FindByName<myMainpageMap>("myMap")  
    myMap.MoveToRegion( ...... )

