Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.62 KB | None | 0 0
  1. Assembly assembly = Assembly.GetExecutingAssembly();
  2. string[] names = new string[] { "United_States_of_America", "United_Kingdom", "Australia", "Germany", "France", "Russia", "China", "Japan", "India", "Italy" };
  3.  
  4. Dictionary<string, Image> images = names.ToDictionary(
  5.     key => key.Replace("_", " "),
  6.     key => ResourceImageHelper.CreateImageFromResources(string.Format("ImageEditOptionsDemo.Resources.Flags.{0}.png", key), assembly));
  7.  
  8. ImageCollectionEditorInfo editorInfo = new ImageCollectionEditorInfo("Nationality", images, true, true, "Nationality");
  9. EditingFieldExtensions.Instance.RegisterEditorInfo(editorInfo);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement