public override void OnCreateParent(IntPtr hwndParent)
        {
            var parameters = new System.Windows.Interop.HwndSourceParameters("CS_Options");

            parameters.PositionX    = 0;
            parameters.PositionY    = 0;
            parameters.Height       = (int)m_page.Height;
            parameters.Width        = (int)m_page.Width;
            parameters.ParentWindow = hwndParent;
            const int WS_CHILD   = 0x40000000;
            const int WS_VISIBLE = 0x10000000;

            parameters.WindowStyle = WS_VISIBLE | WS_CHILD;

            m_source = new System.Windows.Interop.HwndSource(parameters);
            m_source.SizeToContent = System.Windows.SizeToContent.WidthAndHeight;
            m_source.AddHook(ChildHwndSourceHook);
            if (m_source.CompositionTarget != null)
            {
                m_source.CompositionTarget.BackgroundColor = System.Windows.SystemColors.WindowBrush.Color;
            }
            m_source.RootVisual = m_page;
        }
 public bool Equals(System.Windows.Interop.HwndSourceParameters obj)
 {
     return(default(bool));
 }
Esempio n. 3
0
 /// <summary/>
 public HwndSourceSW(System.Windows.Interop.HwndSourceParameters parameters)
 {
     new System.Security.PermissionSet(System.Security.Permissions.PermissionState.Unrestricted).Assert();
     this.innerObject = new System.Windows.Interop.HwndSource(parameters);
 }
Esempio n. 4
-1
    public override void OnCreateParent(IntPtr hwndParent)
    {
      var parameters = new System.Windows.Interop.HwndSourceParameters("CS_Options");
      parameters.PositionX = 0;
      parameters.PositionY = 0;
      parameters.Height = (int)m_page.Height;
      parameters.Width = (int)m_page.Width;
      parameters.ParentWindow = hwndParent;
      const int WS_CHILD = 0x40000000;
      const int WS_VISIBLE = 0x10000000;

      parameters.WindowStyle =  WS_VISIBLE | WS_CHILD;

      m_source = new System.Windows.Interop.HwndSource(parameters);
      m_source.SizeToContent = System.Windows.SizeToContent.WidthAndHeight;
      m_source.AddHook(new System.Windows.Interop.HwndSourceHook(ChildHwndSourceHook));
      m_source.CompositionTarget.BackgroundColor = System.Windows.SystemColors.WindowBrush.Color;
      m_source.RootVisual = m_page;
    }