public TaskThumbWindow(TaskButton parent)
        {
            InitializeComponent();

            taskButton  = parent;
            DataContext = parent.Window;

            taskButton.SetParentAutoHide(false);

            // check if DWM is enabled, if not, hide the thumbnail placeholder
            isDwmEnabled = NativeMethods.DwmIsCompositionEnabled();
            if (!isDwmEnabled)
            {
                dwmThumbnail.Visibility = Visibility.Collapsed;
                pnlTitle.Margin         = new Thickness(0);
            }
        }
예제 #2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.UserControl = ((CairoDesktop.TaskButton)(target));
     return;
     case 2:
     this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.btn = ((System.Windows.Controls.Button)(target));
     
     #line 21 "..\..\TaskButton.xaml"
     this.btn.Click += new System.Windows.RoutedEventHandler(this.btnClick);
     
     #line default
     #line hidden
     return;
     case 4:
     this.MinItem = ((System.Windows.Controls.MenuItem)(target));
     
     #line 30 "..\..\TaskButton.xaml"
     this.MinItem.Click += new System.Windows.RoutedEventHandler(this.Min_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.MaxItem = ((System.Windows.Controls.MenuItem)(target));
     
     #line 31 "..\..\TaskButton.xaml"
     this.MaxItem.Click += new System.Windows.RoutedEventHandler(this.Max_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     
     #line 33 "..\..\TaskButton.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Close_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     this.WinTitle = ((System.Windows.Controls.TextBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }