FolderPicker.SuggestedStartLocation 속성

정의

폴더 선택기가 사용자에게 표시할 폴더를 찾는 초기 위치를 가져오거나 설정합니다.

public:
 property PickerLocationId SuggestedStartLocation { PickerLocationId get(); void set(PickerLocationId value); };
PickerLocationId SuggestedStartLocation();

void SuggestedStartLocation(PickerLocationId value);
public PickerLocationId SuggestedStartLocation { get; set; }
var pickerLocationId = folderPicker.suggestedStartLocation;
folderPicker.suggestedStartLocation = pickerLocationId;
Public Property SuggestedStartLocation As PickerLocationId

속성 값

시작 위치의 식별자입니다.

예제

파일 선택기 샘플에서는 파일 선택기에서 모든 형식의 파일을 표시하는 방법을 보여 줍니다.

이 짧은 샘플 코드는 요청된 위치에서 열리는 FilePicker를 보여 줍니다.

private async void Button_click(object sender, RoutedEventArgs e)
{
    FileOpenPicker filePicker = new FileOpenPicker();
    filePicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
    filePicker.ViewMode = PickerViewMode.List;
    filePicker.FileTypeFilter.Add(".txt");
    StorageFile file = await filePicker.PickSingleFileAsync();
}

설명

SuggestedStartLocation이 폴더 선택기 시작 위치로 항상 사용되는 것은 아닙니다. 사용자에게 일관성을 제공하기 위해 폴더 선택기는 사용자가 이동한 마지막 위치를 기억하고 일반적으로 해당 위치에서 시작합니다.

적용 대상