private async Task GetFieldsAsync()
        {
            ReportFields.Clear();
            SelectedFields.Clear();
            if (SelectedLayer == null)
            {
                return;
            }

            await QueuedTask.Run((Action)(() =>
            {
                foreach (FieldDescription fd in SelectedLayer?.GetFieldDescriptions())
                {
                    string shapeField = SelectedLayer.GetFeatureClass().GetDefinition().GetShapeField();
                    if (fd.Name == shapeField)
                    {
                        continue;                        //filter out the shape field.
                    }
                    var defFieldAction = (Action)(() =>
                    {
                        var field = new ReportField {
                            IsSelected = false, DisplayName = fd.Alias, Name = fd.Name
                        };
                        ReportFields.Add(field);
                        field.FieldSelectionChanged += this.Field_FieldSelectionChanged;
                        //field.IsSelected = true;
                    });
                    ActionOnGuiThread(defFieldAction);
                }
            }));
        }