You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewArgumentException(String.Format("Missing parameter!\nUsage \"{0}\" CanonicalShellColumnId [GET | SET PropertyValue] File(s) \n\nNote that files must be absolute paths and enquoted.\n\nExample: To set property \"Artist\" of an .mp3 file use \"{0}\" System.Music.Artist \"Great Artist\"\"C:\\Users\\Public\\album.mp3\".\n\nVisit https://msdn.microsoft.com/en-us/library/windows/desktop/mt805470(v=vs.85).aspx for more properties.",System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName));
14
+
15
+
SHCOLUMNIDlShellColumnId=newSHCOLUMNID(args[0]);
16
+
17
+
if(lShellColumnId.IsInvalid())
18
+
thrownewArgumentException("Invalid canonical property name. Use e.g. System.Music.Artist");
privatestaticstringcInfo="This example shows how to add and fill custom columns easily."+Environment.NewLine+
22
+
Environment.NewLine
23
+
+"The CreatedColumns event is called every time the columns for a ShellListView are created, i.e. when opening a folder or doing a FullRefresh. "+
24
+
Environment.NewLine
25
+
+"You can either use it to display additional shell columns or to add custom columns. "+
26
+
Environment.NewLine
27
+
+"Shell columns are filled automatically."+Environment.NewLine
28
+
+"For custom columns values have to be provided in the AddItem EventHandler. In the example, 2 columns are added, the first custom column will be used for the path length and the second for the link target."+
29
+
Environment.NewLine
30
+
+"To fill the columns, we use the AddItem event handler. We retrieve the path length, the possible link target and add subitems containing these information to the currently added item.";
0 commit comments