希望知道如何解决这个问题:我在 Initialize Component() 处收到此异常:我认为问题出在 XAML 代码中的网格中,有什么想法吗?
System.Windows.Markup.XamlParseException 发生 Message=“System.Windows.Controls.Border.Child”属性设置了多次。StackTrace:在 Minimal.MainPage.InitializeComponent() 在 Minimal.MainPage..ctor() 的 System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) InnerException:
<basics:GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" />
<Grid Margin="5" Grid.Column="2" Background="White" VerticalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="2" Orientation="Horizontal">
<TextBox Name="SearchTextBox" Text="JOHN" VerticalAlignment="Center" Width="100"
HorizontalAlignment="Left" Margin="2,2,5,2" />
<Button Content="Search by owner name" Click="Button_Click"
Margin="2" VerticalAlignment="Center" HorizontalAlignment="Right" />
</StackPanel>
<ScrollViewer Grid.Row="1">
<esri:FeatureDataGrid x:Name="MyDataGrid"
Map="{Binding ElementName=MyMap}"
GraphicsLayer="{Binding ElementName=MyMap, Path=Layers.[MontgomeryParcels]}" />
</ScrollViewer>
</Grid>
</Border>
</userControls:DraggableWindow>