コード例 #1
0
        protected async void PathChangedHandler(UIChangeEventArgs e)
        {
            if (IsMultiple)
            {
                InternalValue = await JSRunner.GetFilePaths(ElementRef);
            }
            else
            {
                InternalValue = new string[] { e?.Value?.ToString() }
            };

            PathChanged?.Invoke(InternalValue);
        }
コード例 #2
0
        protected override async Task <ParseValue <string[]> > ParseValueFromStringAsync(string value)
        {
            if (IsMultiple)
            {
                var multipleValues = await JSRunner.GetFilePaths(ElementRef);

                return(new ParseValue <string[]>(true, multipleValues, null));
            }
            else
            {
                return(new ParseValue <string[]>(true, new string[] { value?.ToString() }, null));
            }
        }