Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
値と型を持つプロパティのリストがあり、型に応じてさまざまなコントロールをスタックパネルに追加する必要があります。つまり、テキストの場合は TextBox を使用し、ダブルの場合は何らかの数値アップダウン コントロールを使用する必要があります。これはMVVMで実装できますか? どんな助けでも大歓迎です。
ItemsControl暗黙的に適用された を使用できますDataTemplates( に追加しResources、 のみを設定DataType( を使用x:Type))。
ItemsControl
DataTemplates
Resources
DataType
x:Type
ItemsControlこれStackPanelは、UI 要素を子としてのみ許可する最後のステップであるため、ItemsControlデータを項目として受け入れます。
StackPanel
要素?