次のコードを使用して、データ テンプレート アイテムを作成しました。
FrameworkElementFactory textCtrl = new FrameworkElementFactory(typeof(TextBox));
Binding binding1 = new Binding();
string path = "Syncfusion";
binding1.Path = new PropertyPath(path);
textCtrl.SetValue(TextBox.TextProperty,binding1);
Binding binding2 = new Binding();
string path2 = "Text1";
binding2.Path = new PropertyPath(path2);
textCtrl.SetValue(TextBox.NameProperty, binding2);
DataTemplate dt = new DataTemplate();
dt.VisualTree = textCtrl;
データ テンプレートからテキスト ボックスを取得する方法..?
次のリンクを試しました リンク 1
しかし、私は物事を正しく理解していませんでした...
xamlで以下のコードを使用しました
<DataTemplate>
<TextBlock Text="{Binding CellBoundValue}" gridcommon:VisualContainer.WantsMouseInput="False"/>
</DataTemplate>
誰でもこれについて私を助けることができますか?