Example #1
0
 private void lockWindow_Click(object sender, RoutedEventArgs e)
 {
     if (state == WindowPinned.notPinned)
     {
         state = WindowPinned.alwaysTop;
         this.lockWindowImage.Source = new BitmapImage(new Uri("pack://application:,,,/DotNetRevit;component/Utilities/WPF/QueryWindow/UI/Lock.png"));
         this.Topmost = true;
     }
     else if (state == WindowPinned.alwaysTop)
     {
         state = WindowPinned.collapsedTop;
         this.lockWindowImage.Source = new BitmapImage(new Uri("pack://application:,,,/DotNetRevit;component/Utilities/WPF/QueryWindow/UI/UnPin.png"));
         this.Topmost = true;
     }
     else if (state == WindowPinned.collapsedTop)
     {
         state = WindowPinned.notPinned;
         this.lockWindowImage.Source = new BitmapImage(new Uri("pack://application:,,,/DotNetRevit;component/Utilities/WPF/QueryWindow/UI/Pin.png"));
         this.Topmost = false;
     }
 }
 private static void RaisePinnedEvent(IntPtr target, PinOperations operation)
 {
     WindowPinned?.Invoke(typeof(VirtualDesktopService), new WindowPinnedEventArgs(target, operation));
 }