--- lang: ja-jp breaks: true --- # WPF DataGrid の `ItemsSource` をコードビハインドで設定する方法 2022-09-01 ```csharp= datagrid.ItemsSource = null; Binding binding = new Binding(nameof(m_viewModel.IEnumerableRows)) { Source = m_viewModel, IsAsync = true, Mode = BindingMode.OneWay, }; datagrid.SetBinding(DataGrid.ItemsSourceProperty, binding); ``` ###### tags: `WPF` `DataGrid` `ItemsSource`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up