public static ListBoxItem GetUIElement(XamlFileInfo xf) { Viewbox vb = new Viewbox() { Height = 16, Width = 16 }; var ui = ReadImage(xf.Content); vb.Child = ui; StackPanel sp = new StackPanel() { Orientation = System.Windows.Controls.Orientation.Horizontal }; sp.Children.Add(vb); sp.Children.Add(new TextBlock() { Text = xf.Name, Margin = new Thickness(5, 0, 0, 0) }); var item = new ListBoxItem() { Content = sp, Tag = xf }; return(item); }
public string GetXamlElement(XamlFileInfo xf) => GetXaml(xf.Content, xf.Name);