Hi,I'm Using Custom Shape and I want to Add a ListBox to the SettingsPaneView and Bind the shape's ViewModel to the Listbox ,but the data now show ,Anybody can help me,Thanks.
private List<AdjacentSpace6VM> _AdjacentSpaces; public List<AdjacentSpace6VM> AdjacentSpaces { get { return _AdjacentSpaces; } set { _AdjacentSpaces = value; OnPropertyChanged(() => this.AdjacentSpaces); } }<ListBox extensions:SettingsPaneView.EditorPropertyName="DataContext.AdjacentSpaces" extensions:SettingsPaneView.EditorItemType="Shapes,Custom, Connections" extensions:SettingsPaneView.EditorValue="{Binding Path=ItemsSource, Mode=TwoWay, RelativeSource={RelativeSource Self}}" Grid.Row="3" Grid.ColumnSpan="2"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <UniformGrid Columns="3" IsItemsHost="True" Margin="0" /> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemContainerStyle> <Style TargetType="{x:Type ListBoxItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition></ColumnDefinition> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> <TextBlock Grid.Column="0" Text="{Binding Number}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="30" Margin="30 10 0 20" Foreground="White"></TextBlock> <TextBlock Grid.Column="1" Text="{Binding CT}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="30" Margin="10 10 30 20" Foreground="White"></TextBlock> <TextBlock Grid.Column="1" Text="aaa" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="30" Margin="10 10 30 20" Foreground="White"></TextBlock> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </ListBox.ItemContainerStyle> </ListBox>