This project is read-only.
Project Description
AutoExpandOver lets a user define "header" content and "popup" content. Then, depending on settings it will popup when the user hovers, clicks, or gives focus to the "header" content. The popup uses the hidden overlay strategy so it has those benefits/quirks.

Features (properties?)

  • ValidateChildGrid (validate any DataGrids that are inside the popup before closing)
  • OpenOnClick
  • CloseOnClick (closes when you click outside the popup)
  • OpenOnFocus
  • OpenOnHover
  • CloseOnHover (closes when you hover outside the popup)
  • HoldOpenWhenFocused (When CloseOnHover=True if you hover off the popup the popup will close...unless HoldOpenWhenFocused=True and a control inside the popup has focus)
  • Works inside DataGrid cell (wrap it in <grid> tags and it will go over your DataGrid, I love this!)
  • OpenDelay (for hover)
  • CloseDelay (for un-hover)
  • MakeModal (defaults to true, setting to false can cause event timing issues and poor behavior)
  • PopupClosing, PopupClosed events
  • PopupOpening, PopupOpened events

Things to keep in mind!

  • It usually works best to define the height and width of the AutoExpandOver or place it in a container
  • When the popup comes up the default behavior is to hide the content
  • If the header content is larger then the popup and you have CloseOnHover=True the popup may close immediately because the header content is no longer visible and your mouse is not over the popup
  • I try to make sure the header and popup content are the same size or that the popup is bigger, or set CloseOnHover=False
  • If you see it opening and closing seemingly at random put some background colors in so you can see whats really going on
  • There are some debugging messages in the immediate window whiel debugging

Things I want to add

  • Validation states
  • resizing of popup
  • dragging(moving) popup

This project is a work-in-progress. It works, and works well, for what I am using it for but there are several features that have been started but are unfinished since I myself have not had a need for those features.
What may be more useful then anything is some of the code snipits in the project. This grew from something else so there may be code remnants left behind. I also should have made it custom rather then basing it on ContentControl.

Anyway, use and enjoy.

Last edited Sep 24, 2009 at 6:15 PM by midnit, version 8