Surface 2.0 SDK를 사용하는 Windows 멀티 터치 응용 프로그램에서 작업하고 있습니다. 컨트롤을 "복제"해야합니다.이 경우에는 ScatterViewItem이 필요합니다.이 ScatterViewItem에는 Click 이벤트 처리기가있는 "CopyButton"이있는 ElementMenu가 추가되었습니다. 이 내 ScatterViewItem입니다 :서페이스 응용 프로그램에서 ScatterViewItem 컨트롤 복제
<s:ScatterViewItem x:Name="PhotoPadSVI" MinWidth="296" Background="Transparent" Style="{StaticResource ScatterViewItemStyle}">......</ScatterViewItem>
그리고 이것은 내가 사용하는 코드와 그 작동하지 않습니다
void DocumentDuplicate_Click(object sender, RoutedEventArgs e)
{
ScatterViewItem swi = PhotoPadSVI; //error is already here cause I set it as the same, but I cannot found a ".Clone()" like method
swi.Visibility = System.Windows.Visibility.Visible;
swi.ZIndex = 100;
swi.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
//sView.Items.Add(swi); cannot add to ScatterView cause swi is equal to PhotoPadSVI
}
질문을 : 당신은 어떤 방법으로 나는 ScatterViewItem를 복제 할 수 아십니까 ?