Ejemplo n.º 1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Gets the paragraph properties for the specified IVwSelection
		/// </summary>
		/// <param name="vwSel">The view Selection</param>
		/// <param name="vvps">Returned array of IVwPropertyStores in the selection</param>
		/// <param name="cvps">Returned count of IVwPropertyStores</param>
		/// ------------------------------------------------------------------------------------
		public static void GetParaProps(IVwSelection vwSel, out IVwPropertyStore[] vvps,
			out int cvps)
		{
			vvps = null;
			vwSel.GetParaProps(0, ArrayPtr.Null, out cvps);
			using (ArrayPtr arrayPtr = MarshalEx.ArrayToNative<IVwPropertyStore>(cvps))
			{
				vwSel.GetParaProps(cvps, arrayPtr, out cvps);
				vvps = MarshalEx.NativeToArray<IVwPropertyStore>(arrayPtr, cvps);
			}
		}