File Geodatabases are not supported directly by ArcGIS Runtime, but it is possible to use them with the ArcGIS Runtime Local Server component. When using ArcGIS Runtime SDK for .NET, the Local Server is only available with the WPF API and on Windows (not supported when usinf the Android, iOS, or UWP APIs).
You can follow the same workflow as shown in this sample, but instead of creating a `ShapefileWorkspace`, you will create a `FileGeodatabaseWorkspace`. Note, you will need to know in advance the name of the data set within the file geodatabase that you want to add. You can achieve this by also writing a python script in ArcGIS Pro which would take an input string that is the file geodatabase path and return a list of datasets ad a geoprocessing recordset.
API Ref:
https://developers.arcgis.com/net/latest/wpf/api-reference/html/T_Esri_ArcGISRuntime_LocalServices_F...
Sample (Shapefile):
https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/v100.7.0/src/WPF/ArcGISRuntime.WPF.Viewer...
Creating a geoprocessing package for Local Server:
https://developers.arcgis.com/labs/pro/prepare-a-geoprocessing-service-for-offline-use/
Python script example:
# Import necessary modules
import arcpy
import os
# Set variables from input parameters.
workspace = arcpy.GetParameterAsText(0)
# Set the current workspace
arcpy.env.workspace = str(workspace)
# Create the output table.
outTableFc = arcpy.CreateTable_management('in_memory', 'datasets')
# Set the field names and definitions for the output table.
arcpy.AddField_management(outTableFc, 'NAME', 'TEXT', '', '', 256)
arcpy.AddField_management(outTableFc, 'DATATYPE', 'TEXT', '', '', 256)
# Create an insert cursor to insert rows into the output table.
fields = ['NAME', 'DATATYPE']
cur = arcpy.da.InsertCursor(outTableFc, fields)
# Feature
datasets = arcpy.ListFeatureClasses()
# For each dataset insert the name into a new row in the table.
for dataset in datasets:
cur.insertRow((dataset, 'Feature Class'))
# Mosaic
datasets = arcpy.ListDatasets(feature_type='mosaic')
# For each dataset insert the name into a new row in the table.
for dataset in datasets:
cur.insertRow((dataset, 'Mosaic'))
# Raster
datasets = arcpy.ListDatasets(feature_type='raster')
# For each dataset insert the name into a new row in the table.
for dataset in datasets:
cur.insertRow((dataset, 'Raster'))
# Raster
datasets = arcpy.ListDatasets(feature_type='rastercatalog')
# For each dataset insert the name into a new row in the table.
for dataset in datasets:
cur.insertRow((dataset, 'Raster Catalog'))
del cur
# Set the output parameter.
arcpy.SetParameterAsText(1,outTableFc)