This project is read-only.

Patient Banner Zone 2 Height

Nov 8, 2010 at 2:09 PM

We have decided to display the full allergy details in zone 2, section 5. The problem is when we expand zone 2 it does not expand to show the full contents of section 5. It only expands to the height of section 1 or 2 depending on which is greatest.

This is no good as we want to be able to display all allergies in this section and if the section is larger than the address it gets truncated.

Is there any way around this? We've had a look in the code for PatientBanner and tried to change ZoneTwoContent_SizeChanged to determine the maximum of all sections. I'm not sure what's happeneing but this seems to execute in a loop, reducing the heigh of all the contents each iteration until it reaches the height of section 1 or 2.

We are using the latest version ( of the Silverlight CUI controls.

Nov 25, 2010 at 12:46 PM

You can fix this issue by changing the ZoneTwoContent_SizeChanged event of the patient banner to the following


        /// <summary>
        /// Handles the size changed event for Zone two content.
        /// </summary>
        /// <param name="sender">Object whose size got changed.</param>
        /// <param name="e">Event args containing information about old and new sizes.</param>
        private void ZoneTwoContent_SizeChanged(object sender, SizeChangedEventArgs e)
            double subsectionOneContentHeight = this.subsectionOneContentPanel != null
                                                    ? this.subsectionOneContentPanel.ActualHeight
                                                    : 0;
            double subsectionTwoContentHeight = this.subsectionTwoContentPanel != null
                                                    ? this.subsectionTwoContentPanel.ActualHeight
                                                    : 0;
            double subsectionThreeContentHeight = this.subsectionThreeContentPanel != null
                                                      ? this.subsectionThreeContentPanel.ActualHeight
                                                      : 0;
            double subsectionFourContentHeight = this.subsectionFourContentPanel != null
                                                     ? this.subsectionFourContentPanel.ActualHeight
                                                     : 0;
            double subsectionFiveContentHeight = this.subsectionFiveContentPanel != null
                                                     ? this.subsectionFiveContentPanel.ActualHeight
                                                     : 0;
            var max1 = Math.Max(subsectionOneContentHeight, subsectionTwoContentHeight);
            var max2 = Math.Max(subsectionThreeContentHeight, subsectionFourContentHeight);
            var max3 = Math.Max(max1, max2);
            var actualMax = Math.Max(max3, subsectionFiveContentHeight);

            this.zoneTwoHeight = new GridLength(actualMax, GridUnitType.Auto);