Example #1
0
        /// <summary>
        /// Initializes the instance of the AppControl class with the SafeAppControlHandle.
        /// </summary>
        /// <param name="handle"></param>
        /// <since_tizen> 3 </since_tizen>
        public AppControl(SafeAppControlHandle handle)
        {
            if (handle == null)
            {
                throw new ArgumentNullException("handle");
            }

            Interop.AppControl.ErrorCode err = Interop.AppControl.DangerousClone(out _handle, handle.DangerousGetHandle());
            if (err != Interop.AppControl.ErrorCode.None)
            {
                throw new InvalidOperationException("Failed to clone the appcontrol handle. Err = " + err);
            }
        }