public static bool IsInitiatedValue(string type, MarginStruct mStruct) { if (type.Contains("Futures") && mStruct.LongMarginRatioByMoney == 0 && mStruct.LongMarginRatioByVolume == 0 && mStruct.ShortMarginRatioByMoney == 0 && mStruct.ShortMarginRatioByVolume == 0 || (type.Contains("Option") && mStruct.FixedMargin == 0 && mStruct.MiniMargin == 0 && mStruct.MiniMargin == 0)) { return(true); } return(false); }
public static Boolean ExtendGlassFrame(Window window, Thickness margin) { if (!(IsDwmIsCompositionEnabled())) { return(false); } IntPtr hwnd = new WindowInteropHelper(window).Handle; if (hwnd == IntPtr.Zero) { throw new InvalidOperationException(Resources.VistaAeroAPI_ExtendGlassFrame_The_Window_must_be_shown_before_extending_glass_); } window.Background = Brushes.Transparent; // ReSharper disable PossibleNullReferenceException HwndSource.FromHwnd(hwnd).CompositionTarget.BackgroundColor = Colors.Transparent; // ReSharper restore PossibleNullReferenceException var margins = new MarginStruct(margin); DwmExtendFrameIntoClientArea(hwnd, ref margins); return(true); }
extern static void DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MarginStruct pMargins);