public HResult GetPropertyDescriptionList(ref PROPERTYKEY keyType, ref Guid riid, out IntPtr ppv) { throw new NotSupportedException(); }
internal static extern HResult PSGetPropertyDescription( ref PROPERTYKEY propkey, ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out IPropertyDescription ppv );
internal static extern int PSGetPropertyKeyFromName( [In, MarshalAs(UnmanagedType.LPWStr)] string pszCanonicalName, out PROPERTYKEY propkey );
private void miSelAllByDate_Click(object sender, RoutedEventArgs e) { if (_ShellListView.GetSelectedCount() > 0) { var typePK = new PROPERTYKEY() { fmtid = Guid.Parse("b725f130-47ef-101a-a5f1-02608c9eebac"), pid = 15 }; var flt = _ShellListView.SelectedItems.Select(item => DateTime.Parse(item.GetPropertyValue(typePK, typeof(String)).Value.ToString().ToLowerInvariant()).Date); var items = _ShellListView.Items.Where(w => flt.Contains(DateTime.Parse(w.GetPropertyValue(typePK, typeof(String)).Value.ToString().ToLowerInvariant()).Date)).ToArray(); _ShellListView.SelectItems(items); btnCondSel.IsDropDownOpen = false; } }
internal static extern int PSGetNameFromPropertyKey( ref PROPERTYKEY propkey, [Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszCanonicalName );
//public PropVariant GetPropertyValue(PROPERTYKEY pkey, Type type) => this._Item.GetPropertyValue(pkey, type); public PropVariant GetPropertyValue(PROPERTYKEY pkey, Type type) => this._Item.GetPropertyValue(pkey);
private void miSelAllByType_Click(object sender, RoutedEventArgs e) { if (_ShellListView.GetSelectedCount() > 0) { var typePK = new PROPERTYKEY() { fmtid = Guid.Parse("B725F130-47EF-101A-A5F1-02608C9EEBAC"), pid = 4 }; var flt = _ShellListView.SelectedItems.Select(item => item.GetPropertyValue(typePK, typeof(String)).Value.ToString().ToLowerInvariant()); var items = _ShellListView.Items.Where(w => flt.Contains(w.GetPropertyValue(typePK, typeof(String)).Value.ToString().ToLowerInvariant())).ToArray(); _ShellListView.SelectItems(items); btnCondSel.IsDropDownOpen = false; } }
/// <summary> /// Creates a new column list whose columns are all visible, /// given an array of PropertyKey structures. The default is based on FolderTypeID. /// </summary> /// <remarks>This property may not work correctly with the ExplorerBrowser control.</remarks> public void SetVisibleColumns(PROPERTYKEY[] value) { HResult hr = NativeSearchFolderItemFactory.SetVisibleColumns(value == null ? 0 : (uint)value.Length, value); if (hr != HResult.S_OK) throw Marshal.GetExceptionForHR((int)hr); }