継承元の継承階層を見ると、プロパティがないことがTextBoxわかります。これは、 がバインドされるアイテムがなく、したがって がないため、理にかなっています。ただし、forまたは編集可能なものが必要であり、以下の状況に基づいてオプションを探しています。TextBoxDisplayMemberPathItemsSourceDisplayMemberPathDisplayMemberPathTextBox
私が使用しているクラス/ビュー/ビューモデル:
Test.cs- コード ファースト エンティティ
public class Test : BaseModel
{
    public int Id { get; set; }
    public int GasProfileId { get; set; }
}
GasProfile.cs- コード ファースト エンティティ
public class GasProfile : BaseModel
{
    public int Id { get; set; }
    public double H2O { get; set; }
    public double CO2 { get; set; }
    private ObservableCollection<Test> _tests;
    public virtual ObservableCollection<Test> Tests
    {
        get { return _tests; }
        set
        {
            if (_tests != value)
            {
                _tests = value;
                Notify("Tests");
            }
        }
    }
}
TestGasView.xaml- 表示 (USerControl)
TestGasView.xamlは次のようになります。
<Grid>
    <ListBox ItemsSource="{Binding SelectedTechnician.Test}"
             DisplayMemberPath="TestName">
             selectedItem="SelectedTest"
    </ListBox>
    <Label Content="H20"/>
    <TextBox></TextBox>
    <Label Content="CO2"/>
    <TextBox></TextBox>
</Grid>
これは私がそれをどのように見せたいか/どのように振る舞うかです(警告:壊れたコード/疑似コード):
<Grid>
    <ListBox ItemsSource="{Binding SelectedTechnician.Test}"
             DisplayMemberPath="TestName"
             SelectedItem="SelectedTest">
    </ListBox>
    <Label Content="H20"/>
    <TextBox Text="{Binding SelectedTest.GasProfile}"
             DiaplayMemberPath="H20"></TextBox>
    <Label Content="CO2"/>
    <TextBox Text="{Binding SelectedTest.GasProfile}"
             DiaplayMemberPath="CO2"></TextBox>
</Grid>
TestGasViewModel.cs- ビューモデル
SelectedTest を取得/設定するプロパティがあります。
ご覧のとおり、TextBoxes に必要なデータ バインディングは、 の配置と同様に間違っていますがDisplayMemberPath、これは、表示される値を 1) 編集可能にし、2) テストをクリックして表示し、 SelectedTest がキーを持つ GasProfile の「ガス プロパティ」にバインドします。
したがって、私の質問は、「プロパティを GasProfile にTextBoxバインドして、Text表示したいガスの値を取得できるようにするために欠けているプロパティはありますか?」ということです。そうでない場合は、おそらく次のようなバインドを有効にするプロキシ クラスを作成する方法があります。
<Grid>
    <ListBox ItemsSource="{Binding SelectedTechnician.Test}"
             DisplayMemberPath="TestName"
             SelectedItem="SelectedTest">
    </ListBox>
    <Label Content="H20"/>
    <TextBox Text="{Binding SelectedTestGasProfile.H20}"></TextBox>
    <Label Content="CO2"/>
    <TextBox Text="{Binding SelectedTestGasProfile.CO2}"></TextBox>
</Grid>
「ああ、このプロパティを使用してください」でない場合はTextBox、上記を実現するためのコードの提案を探しています。
ありがとう
編集
これは、実際に選択したテストがあり、FieldGasProfileID (GasProfile の意味) に値があることを示すスクリーンショットです。
