Healthcare Prototype

Prototype of next generation healthcare application using WPF. A large codebase provided here with many interesting data visualization techniques.

C# (15.7 MB)
 
 
 
 
 
4.3 Star
(3)
14,039 times
Add to favorites
3/1/2011
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
    >
	<ControlTemplate x:Key="PatientDetailsExpander" TargetType="{x:Type Expander}">
		<Border Background="{TemplateBinding Background}" x:Name="Border" Margin="2"  >
			<DockPanel x:Name="DockPanel">
				<ToggleButton IsChecked="{Binding Path=IsExpanded,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" 
							  DockPanel.Dock="Top" x:Name="HeaderSite" 
							  Content="{TemplateBinding Header}" >
					<ToggleButton.Style>
						<Style TargetType="{x:Type ToggleButton}">
							<Setter Property="Template">
								<Setter.Value>
									<ControlTemplate TargetType="{x:Type ToggleButton}">
										<Border x:Name="Border" Padding="{TemplateBinding Padding}" Height="28">
											<Grid Name="Button7Grid">
												<Rectangle x:Name="bgcolor" RadiusX="4" RadiusY="4">
													<Rectangle.Stroke>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#858585" Offset="0" />
																	<GradientStop Color="#292929" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Rectangle.Stroke>
													<Rectangle.Fill>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#191919" Offset="0" />
																	<GradientStop Color="#343433" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Rectangle.Fill>
												</Rectangle>
												<Rectangle x:Name="outer" StrokeThickness="1" RadiusX="4" RadiusY="4">
													<Rectangle.Stroke>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#858585" Offset="0" />
																	<GradientStop Color="#292929" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Rectangle.Stroke>
													<Rectangle.Fill>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#191919" Offset="0" />
																	<GradientStop Color="#343433" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Rectangle.Fill>
												</Rectangle>
												<Rectangle x:Name="inner"  RadiusX="4" RadiusY="4" StrokeThickness="1" StrokeMiterLimit="10" StrokeEndLineCap="Flat" StrokeStartLineCap="Flat" StrokeLineJoin="Miter" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="0" Grid.RowSpan="1" Margin="3,3,3,0" HorizontalAlignment="Stretch" VerticalAlignment="Top" Width="Auto" Height="Auto">
													<Rectangle.Fill>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#191919" Offset="0" />
																	<GradientStop Color="#343433" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Rectangle.Fill>
												</Rectangle>
												<Rectangle x:Name="BrightShine" Visibility="Collapsed" Margin="2" Height="Auto" RadiusX="4px" RadiusY="4px" VerticalAlignment="top">
													<Rectangle.Fill>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="transparent" Offset="0" />
																	<GradientStop Color="#909090" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Rectangle.Fill>
												</Rectangle>


												<ContentPresenter DataContext="{x:Null}" TextBlock.Foreground="white" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0" Grid.Column="1" x:Name="ContentSite" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" RecognizesAccessKey="True"/>
											</Grid>
										</Border>
										<ControlTemplate.Triggers>
											<!-- Focused -->
											<Trigger Property="IsChecked" Value="true">
												<Setter TargetName="bgcolor" Property="Fill">
													<Setter.Value>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#E8E8E8" Offset="0" />
																	<GradientStop Color="#FFFFFF" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Setter.Value>
												</Setter>
												<Setter TargetName="outer" Property="Visibility" Value="Collapsed" />
												<Setter TargetName="bgcolor" Property="Stroke">
													<Setter.Value>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#DCDCDC" Offset="0" />
																	<GradientStop Color="#C6C5C5" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Setter.Value>
												</Setter>
												<Setter TargetName="BrightShine" Property="Visibility" Value="Visible" />
												<Setter TargetName="ContentSite" Property="TextElement.Foreground" Value="#454545" />
											</Trigger>
											<!-- MouseOver -->
											<Trigger Property="IsMouseOver" Value="true">
												<Setter TargetName="bgcolor" Property="Fill">
													<Setter.Value>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#E8E8E8" Offset="0" />
																	<GradientStop Color="#FFFFFF" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Setter.Value>
												</Setter>
												<Setter TargetName="outer" Property="Visibility" Value="Collapsed" />
												<Setter TargetName="bgcolor" Property="Stroke">
													<Setter.Value>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#DCDCDC" Offset="0" />
																	<GradientStop Color="#C6C5C5" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Setter.Value>
												</Setter>
												<Setter TargetName="BrightShine" Property="Visibility" Value="Visible" />
												<Setter TargetName="ContentSite" Property="TextElement.Foreground" Value="#454545" />
											</Trigger>
										</ControlTemplate.Triggers>
									</ControlTemplate>
								</Setter.Value>
							</Setter>
						</Style>
					</ToggleButton.Style>
				</ToggleButton>
				<ContentPresenter    DockPanel.Dock="Bottom" x:Name="ExpandSite" RenderTransformOrigin="0.5,0.5"  >
					<ContentPresenter.LayoutTransform>
						<TransformGroup >
							<ScaleTransform x:Name="LayoutScaleTransform" ScaleX="1" ScaleY="1" />
						</TransformGroup>
					</ContentPresenter.LayoutTransform>
				</ContentPresenter>
			</DockPanel>
		</Border>
		<ControlTemplate.Triggers>
			<Trigger Property="IsExpanded" Value="False">
				<Trigger.EnterActions>
					<BeginStoryboard>
						<Storyboard>
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(ScaleTransform.ScaleY)" Storyboard.TargetName="LayoutScaleTransform" DecelerationRatio="1">
								<SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="1" KeyTime="00:00:00"/>
								<SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="00" KeyTime="00:00:00.25"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</BeginStoryboard>
				</Trigger.EnterActions>
				<Trigger.ExitActions>
					<BeginStoryboard>
						<Storyboard>
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(ScaleTransform.ScaleY)" Storyboard.TargetName="LayoutScaleTransform" AccelerationRatio="1">
								<SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="0" KeyTime="00:00:00"/>
								<SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="1" KeyTime="00:00:00.25"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</BeginStoryboard>
				</Trigger.ExitActions>
			</Trigger>
		</ControlTemplate.Triggers>

	</ControlTemplate>



	<ControlTemplate x:Key="PatientDetailsHorizontalExpander" TargetType="{x:Type Expander}">
		<Border Background="{TemplateBinding Background}" x:Name="Border" Margin="2"  >
			<DockPanel x:Name="DockPanel">
				<ToggleButton IsChecked="{Binding Path=IsExpanded,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" 
							  DockPanel.Dock="Right" x:Name="HeaderSite" 
							  Content="{TemplateBinding Header}" >
					<ToggleButton.Style>
						<Style TargetType="{x:Type ToggleButton}">
							<Setter Property="Template">
								<Setter.Value>
									<ControlTemplate TargetType="{x:Type ToggleButton}">
										<Border x:Name="Border" Padding="{TemplateBinding Padding}" Width="28">
											<Grid Name="Button7Grid">
												<Rectangle x:Name="bgcolor" RadiusX="4" RadiusY="4">
													<Rectangle.Stroke>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#858585" Offset="0" />
																	<GradientStop Color="#292929" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Rectangle.Stroke>
													<Rectangle.Fill>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#191919" Offset="0" />
																	<GradientStop Color="#343433" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Rectangle.Fill>
												</Rectangle>
												<Rectangle x:Name="outer" StrokeThickness="1" RadiusX="4" RadiusY="4">
													<Rectangle.Stroke>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#858585" Offset="0" />
																	<GradientStop Color="#292929" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Rectangle.Stroke>
													<Rectangle.Fill>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#191919" Offset="0" />
																	<GradientStop Color="#343433" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Rectangle.Fill>
												</Rectangle>
												<Rectangle x:Name="inner"  RadiusX="4" RadiusY="4" StrokeThickness="1" StrokeMiterLimit="10" StrokeEndLineCap="Flat" StrokeStartLineCap="Flat" StrokeLineJoin="Miter" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="0" Grid.RowSpan="1" Margin="3,3,3,0" HorizontalAlignment="Stretch" VerticalAlignment="Top" Width="Auto" Height="Auto">
													<Rectangle.Fill>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#191919" Offset="0" />
																	<GradientStop Color="#343433" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Rectangle.Fill>
												</Rectangle>
												<Rectangle x:Name="BrightShine" Visibility="Collapsed" Margin="2" Height="Auto" RadiusX="4px" RadiusY="4px" VerticalAlignment="top">
													<Rectangle.Fill>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="transparent" Offset="0" />
																	<GradientStop Color="#909090" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Rectangle.Fill>
												</Rectangle>


												<ContentPresenter DataContext="{x:Null}" TextBlock.Foreground="white" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="4,0,0,0" Grid.Column="1" x:Name="ContentSite" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" RecognizesAccessKey="True"/>
											</Grid>
										</Border>
										<ControlTemplate.Triggers>
											<!-- Focused
							<Trigger Property="IsChecked" Value="true">
								<Setter TargetName="bgcolor" Property="Fill">
									<Setter.Value>
										<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
											<GradientBrush.GradientStops>
												<GradientStopCollection>
													<GradientStop Color="#E8E8E8" Offset="0" />
													<GradientStop Color="#FFFFFF" Offset="1" />
												</GradientStopCollection>
											</GradientBrush.GradientStops>
										</LinearGradientBrush>
									</Setter.Value>
								</Setter>
								<Setter TargetName="outer" Property="Visibility" Value="Collapsed" />
								<Setter TargetName="bgcolor" Property="Stroke">
									<Setter.Value>
										<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
											<GradientBrush.GradientStops>
												<GradientStopCollection>
													<GradientStop Color="#DCDCDC" Offset="0" />
													<GradientStop Color="#C6C5C5" Offset="1" />
												</GradientStopCollection>
											</GradientBrush.GradientStops>
										</LinearGradientBrush>
									</Setter.Value>
								</Setter>
								<Setter TargetName="BrightShine" Property="Visibility" Value="Visible" />
								<Setter TargetName="ContentSite" Property="TextElement.Foreground" Value="#454545" />
							</Trigger> -->
											<!-- MouseOver -->
											<Trigger Property="IsMouseOver" Value="true">
												<Setter TargetName="bgcolor" Property="Fill">
													<Setter.Value>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#E8E8E8" Offset="0" />
																	<GradientStop Color="#FFFFFF" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Setter.Value>
												</Setter>
												<Setter TargetName="outer" Property="Visibility" Value="Collapsed" />
												<Setter TargetName="bgcolor" Property="Stroke">
													<Setter.Value>
														<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
															<GradientBrush.GradientStops>
																<GradientStopCollection>
																	<GradientStop Color="#DCDCDC" Offset="0" />
																	<GradientStop Color="#C6C5C5" Offset="1" />
																</GradientStopCollection>
															</GradientBrush.GradientStops>
														</LinearGradientBrush>
													</Setter.Value>
												</Setter>
												<Setter TargetName="BrightShine" Property="Visibility" Value="Visible" />
												<Setter TargetName="ContentSite" Property="TextElement.Foreground" Value="#454545" />
											</Trigger>
										</ControlTemplate.Triggers>
									</ControlTemplate>
								</Setter.Value>
							</Setter>
						</Style>
					</ToggleButton.Style>
				</ToggleButton>
				<ContentPresenter    DockPanel.Dock="Bottom" x:Name="ExpandSite" RenderTransformOrigin="0.5,0.5"  >
					<ContentPresenter.LayoutTransform>
						<TransformGroup >
							<ScaleTransform x:Name="LayoutScaleTransform" ScaleX="1" ScaleY="1" />
						</TransformGroup>
					</ContentPresenter.LayoutTransform>
				</ContentPresenter>
			</DockPanel>
		</Border>
		<ControlTemplate.Triggers>
			<Trigger Property="IsExpanded" Value="False">
				<Trigger.EnterActions>
					<BeginStoryboard>
						<Storyboard>
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(ScaleTransform.ScaleX)" Storyboard.TargetName="LayoutScaleTransform" DecelerationRatio="1">
								<SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="1" KeyTime="00:00:00"/>
								<SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="00" KeyTime="00:00:00.25"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</BeginStoryboard>
				</Trigger.EnterActions>
				<Trigger.ExitActions>
					<BeginStoryboard>
						<Storyboard>
							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(ScaleTransform.ScaleX)" Storyboard.TargetName="LayoutScaleTransform" AccelerationRatio="1">
								<SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="0" KeyTime="00:00:00"/>
								<SplineDoubleKeyFrame d:KeyEase="Linear;Linear;0.5;0.5;0.5;0.5" KeySpline="0.5,0.5,0.5,0.5" Value="1" KeyTime="00:00:00.25"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</BeginStoryboard>
				</Trigger.ExitActions>
			</Trigger>
		</ControlTemplate.Triggers>

	</ControlTemplate>
</ResourceDictionary>