2012-01-05 68 views
1

我使用silverlight 5並在設計器中出現錯誤,當我將一個用戶控件放入DataGridDragDropTarget時,值不在預期範圍內。而我的用戶控件基本上就是一個數據網格。以下是代碼:值不在DataGridDragDropTarget的預期範圍內

<StackPanel Orientation="Horizontal"> 
     <toolkit:DataGridDragDropTarget AllowedSourceEffects="Copy" 
             VerticalAlignment="Top"> 
       <views:CustomerGrid x:Name="customerGrid" d:LayoutOverrides="Width, Height" /> 
     </toolkit:DataGridDragDropTarget> 
    </StackPanel> 

回答

0

您確定您的頁面上沒有任何其他名爲「customerGrid」的控件?

0

嘗試刪除bin Debug \ release文件夾,將x:name放到面板上,或者如ghost_mv所示,檢查是否存在其他具有相同名稱的控件。

相關問題