This project is read-only.

Help with Patient Banner Control

Aug 11, 2009 at 9:44 PM

Hi, we are adding the patientBanner control to our document viewer application, which is a C# winforms app.  I have placed the patientBanner in the top panel of a horizontal splitContainer.

I'm having troubles figuring out how to respond to the double-down-arrow button to expand the banner to show zones 1-5; address, phone, email, allergies, etc.

I'm trying to add a DataBinding for the SplitterDistance in my splitContainer to the patientBanner height property.  And that works in some cases, but I don't know what to monitor, or event to respond to so that I can adjust the SplitterDistance programmatically.

Thanks for your assistance.

Aug 11, 2009 at 11:40 PM

I have figured this out, and wanted to post the answer for future browsers.

I created a new function in my class.  In the function I monitor the ZoneTwoExpanded property and then adjust my splitContainer's SplitterDistance.

Here's my function:

private void fnChangeSplitterSize(object sender, PropertyChangedEventArgs e)
    if (this.patientBanner1.ZoneTwoExpanded == true)
        this.splitContainer1.SplitterDistance = 174;
        this.splitContainer1.SplitterDistance = 87;
Once you have this in place, you can set the PropertyChanged property to fnChangeSplitterSize.

I would much rather that I NOT set these two values to integers, but instead set them to referential values, but interestingly enough, this.splitContainer1.SplitterDistance = this.PatientBanner1.Height; does NOT work as the height still seems to be 87 when you would want it to be 174.

Obviously, you will want to implement this as it fits in your environment, but I think the framework I've been able to work out is helpful.  If anyone has a more graceful method, please let me know.

Aug 12, 2009 at 1:04 PM

hi there

Thanks for your input. I have raised your point with a member of the development team and include their response below:

Winforms version of patient banner control does not raise an event on expanding or collapsing zone two and hence you will have to monitor the ZoneTwoExpanded property or the SizeChanged event. Looks like you have been monitoring the property and you are getting notification before the actual new size has been determined and hence you are still getting the old height of the patient banner. We would suggest you to listen to the SizeChanged event so that you get notified after the new size has been determined. Following code snippet shows how you can achieve the same:


private void patientBanner1_SizeChanged(object sender, EventArgs e)


this.splitContainer1.SplitterDistance = this.patientBanner1.Height;



Tom Chapman

MSCUI Release Manager