내 Windows Phone 앱에서 메서드를 재정 의하여 일부 정보가 RadListPicker
으로 채워집니다. 두 개의 배열이 있습니다. 하나는 크기가 n 인 미리 채워진 DateTime 배열이고, 두 번째는 크기가 n 인 미리 채워진 문자열 배열입니다. 이 두 배열을 RadListPicker
에 할당하여 문자열 배열이 표시되는 즉, 사용자가 선택 항목으로보고, DateTimeArray가 RadListPicker.SelectedValue가 반환하는 것으로 지정했습니다. 내가이 방법을 시도했을 때RadListPicker에서 selectedIndex의 값을 변경하는 방법
, 나는 디버거 휴식
있어private void ShowResults(DateTime[] arrayDateTime, string[] arrayString, timeTypeEnum timeType)
{
radListPicker.ItemsSource = arrayString;
radListPicker.SelectedValue = arrayDateTime;
radListPicker.SelectedIndex = 4;
}
어떻게이 문제를 해결할 수 있습니까?
디버거를 실행할 때 어떤 줄이 두 번째 줄에서 튀어 나오나요? – MethodMan
Freakishly, 배열의 데이터 형식을 실제로 List <>로 변경하고 배열보다는 ItemsSource를 목록에 할당하는 것이 더 쉬운 것 같습니다. List <>를 사용하여이 작업을 완료했습니다. 여기 Telerik 링크가 있습니다. 그것을하는 방법을 보여주는 http://www.telerik.com/help/windows-phone/radlistpicker-getting-started.html – MethodMan
당신도 이와 비슷한 것을 할 수 있을까요? radListPicker.ItemsSource = new string [] {arrayString}; ' – MethodMan