ItemControl、DataTemplate、および Visifire チャートの使用に問題があります。
まず、XAML のコードは次のとおりです。
<DataTemplate x:Key="markerChartTemplate">
<vc:Chart Height="200" Theme="Theme1" Style="{StaticResource ChartStyle}">
<vc:Chart.Series>
<vc:DataSeries RenderAs="Line" LightWeight="true" ShadowEnabled="false" LightingEnabled="false" MarkerSize="4" LineThickness="1" DataPoints="{Binding _xAxisCollection}" />
<vc:DataSeries RenderAs="Line" LightWeight="true" ShadowEnabled="false" LightingEnabled="false" MarkerSize="4" LineThickness="1" DataPoints="{Binding _yAxisCollection}" />
<vc:DataSeries RenderAs="Line" LightWeight="true" ShadowEnabled="false" LightingEnabled="false" MarkerSize="4" LineThickness="1" DataPoints="{Binding _zAxisCollection}" />
</vc:Chart.Series>
</vc:Chart>
</DataTemplate>
<ScrollViewer HorizontalScrollBarVisibility="Disabled" HorizontalAlignment="Stretch" VerticalScrollBarVisibility="Auto">
<ItemsControl VerticalAlignment="Stretch" HorizontalAlignment="Stretch" ItemsSource="{Binding Path=_markerChartsCollections}" ItemTemplate="{StaticResource markerChartTemplate}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</ScrollViewer>
_markerChartsCollections
と定義されている
public ObservableCollection<My3DLineChartObject> _markerChartsCollections
ViewModel と Model の両方で。
さて、Model で 2 つのMy3DLineChartObject
オブジェクトを初期化し、それを に入れ_markerChartsCollections
ます。
その結果、_markerChartsCollections の My3DLineChartObject と同じ数の 2 つが表示されます。ただし、_xAxisCollection、_yAxisCollection、_zAxisCollection などの My3DLineChartObject のプロパティは表示できません。
考えられる理由を理解できる人はいますか?
出力情報は
'SkeletonMarkerCapture.vshost.exe' (CLR v4.0.30319: SkeletonMarkerCapture.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero2\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero2.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'SkeletonMarkerCapture.vshost.exe' (CLR v4.0.30319: SkeletonMarkerCapture.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_32\Microsoft.Kinect\v4.0_2.0.0.0__31bf3856ad364e35\Microsoft.Kinect.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'SkeletonMarkerCapture.vshost.exe' (CLR v4.0.30319: SkeletonMarkerCapture.vshost.exe): Loaded 'C:\Users\admin\Desktop\Hand\SkeletonMarkerCapture_Good_2\SkeletonMarkerCapture\bin\Debug\AForge.Imaging.dll'. Cannot find or open the PDB file.
'SkeletonMarkerCapture.vshost.exe' (CLR v4.0.30319: SkeletonMarkerCapture.vshost.exe): Loaded 'C:\Users\admin\Desktop\Hand\SkeletonMarkerCapture_Good_2\SkeletonMarkerCapture\bin\Debug\Emgu.CV.dll'. Module was built without symbols.
'SkeletonMarkerCapture.vshost.exe' (CLR v4.0.30319: SkeletonMarkerCapture.vshost.exe): Loaded 'C:\Users\admin\Desktop\Hand\SkeletonMarkerCapture_Good_2\SkeletonMarkerCapture\bin\Debug\Emgu.Util.dll'. Module was built without symbols.
'SkeletonMarkerCapture.vshost.exe' (CLR v4.0.30319: SkeletonMarkerCapture.vshost.exe): Loaded 'C:\Users\admin\Desktop\Hand\SkeletonMarkerCapture_Good_2\SkeletonMarkerCapture\bin\Debug\AForge.dll'. Cannot find or open the PDB file.
The thread 0x75d4 has exited with code 259 (0x103).
'SkeletonMarkerCapture.vshost.exe' (CLR v4.0.30319: SkeletonMarkerCapture.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXmlLinq\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXmlLinq.dll'. Cannot find or open the PDB file.
'SkeletonMarkerCapture.vshost.exe' (CLR v4.0.30319: SkeletonMarkerCapture.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXml\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXml.dll'. Cannot find or open the PDB file.
'SkeletonMarkerCapture.vshost.exe' (CLR v4.0.30319: SkeletonMarkerCapture.vshost.exe): Loaded 'C:\Users\admin\Desktop\Hand\SkeletonMarkerCapture_Good_2\SkeletonMarkerCapture\bin\Debug\GalaSoft.MvvmLight.dll'. Symbols loaded.
'SkeletonMarkerCapture.vshost.exe' (CLR v4.0.30319: SkeletonMarkerCapture.vshost.exe): Loaded 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.`enter code here`0__31bf3856ad364e35\UIAutomationTypes.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.