FrameworkElementFactory objFrame = new FrameworkElementFactory(typeof(TextBlock)); objFrame.SetValue(TextBlock.TextProperty, "country"); objFrame.Name="somename"; DataTemplate dt1 = new DataTemplate(); dt1.VisualTree = objFrame;
TextBlock txt = dt1.FindName("somename", (FrameworkElement)TextBlock) as TextBlock;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)