2014-02-10 43 views
0

我在項目中引用了silverlight xaml文件。當我嘗試建立這個項目,它拋出以下錯誤Silverlight XAML文件錯誤:成員「Margin」無法識別或無法訪問

The member "Margin" is not recognized or is not accessible. 

這裏是我的代碼:

<UserControl x:Class="DBServer.Selenium.Silvernium.ReferenceApplication.SilverlightFixture" 
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> 
<navigation:Frame x:Name="frameContent" Source="/MainPage.xaml" Margin="0,0,0,0"/> 
</UserControl> 
+0

我也沒有看到任何問題。也許你可以刪除導航控件,編譯解決方案。然後再添加它,編譯它。我想其他錯誤會導致保證金的錯誤。 –

回答

0

你試過把框架網格內?

<Grid> 
<navigation:Frame x:Name="frameContent" Source="/MainPage.xaml" Margin="0,0,0,0"/> 
</Grid> 

,因爲你說的保證金=「0,0,0,0」,但在XAML你沒有任何其他的內容作爲參考在保證金中定義的這個距離,所以通過去除或嘗試保證金或放入電網