私は非常にWPFの新しいMVVMで作業していますが、私のデータグリッドは更新されていませんが、私はPropertyChangedイベント中にSlotFloorDataプロパティの新しい変更を見ることができます。以下 ビューが更新されていません(MVVM)が関連付けられているプロパティが正しく更新されています
は(grid.rowが財産SlotFloorDataにバインドされた)XAMLコードです:私はCasinoCADDViewModelにし、DashboardViewでメインモデルIEでINotifyPropertyChangedのを実装しています
<Page x:Class="CasinoCAD.V6.Views.DashboardView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vm="clr-namespace:CasinoCAD.V6.ViewModels"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300"
Title="DashboardView">
<Page.DataContext>
<vm:CasinoCADDViewModel x:Name="viewModel"/>
</Page.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="200"/>
<RowDefinition Height="200"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="Dashboard View" />
<DataGrid Grid.Row="1" Name="grdDB" ItemsSource="{Binding Path=SlotFloorData}" />
<!--<DataGrid Grid.Row="2" ItemsSource="{Binding Path=Properties }" />-->
</Grid>
</Page>
、私は、以下の(Iを持っています)ここにもINotifyPropertyChangedのを試してみましたが、それはうまくいきませんでした:
私は他の情報を配置する必要がある場合、私に知らせてください、ここで
TIA!
SlotFloorDataプロパティの値を実際に変更しているのですか、単にコレクションの内容を変更していますか? –
ViewModelを少し見てみたいと思います。コレクションの種類と更新方法を見ることができるように、十分な情報があれば助かります。 – Goblin