0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

XAMLで他のクラスを参照したい

Posted at

XAMLでは一般的に

<'Window.DataContext>
vm:ほにゃほにゃViewModel/
<'/Window.DataContext>

↑で書かれているViewModelしか参照できない

でもほにゃほにゃViewModel以外のViewModelmo参照したい!っていう時

例)Asdf="{Binding Path=DataContext.クラス名.プロパティ}"

Path=DataContext.○○クラス.プロパティを参照しますに変わる
デフォルトだったらItemsSourceの中身見てるんだけど
Path=DataContext.でここ見ますよになる

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?