Click here to Skip to main content
15,885,366 members
Articles / Desktop Programming / WPF

OpenWPFChart: assembling charts from components: Part I - Parts

Rate me:
Please Sign up or sign in to vote.
4.29/5 (17 votes)
19 Mar 2009CPOL14 min read 81.8K   4K   81  
Provides the component model along with base components to assemble charts.
<!--revision $Id: DialogStyle.xaml 18093 2009-03-16 04:15:06Z unknown $-->
<ResourceDictionary 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	
	<Style x:Key="dialogWindow" TargetType="Window">
		<Setter Property="ShowInTaskbar" Value="False" />
		<Setter Property="SizeToContent" Value="WidthAndHeight" />
		<Setter Property="ResizeMode" Value="NoResize" />
		<Setter Property="BorderBrush" Value="Cornsilk" />
		<Setter Property="BorderThickness" Value="10" />
		<Setter Property="Background" Value="AliceBlue" />
	</Style>
	<Style TargetType="Label">
		<Setter Property="VerticalAlignment" Value="Center" />
		<Setter Property="Padding" Value="5" />
	</Style>
	<Style TargetType="Button">
		<Setter Property="VerticalAlignment" Value="Center" />
		<Setter Property="Margin" Value="5, 10, 5, 5" />
	</Style>
	<Style TargetType="RadioButton">
		<Setter Property="VerticalAlignment" Value="Center" />
		<Setter Property="Margin" Value="5, 10, 5, 5" />
	</Style>
	<Style TargetType="CheckBox">
		<Setter Property="VerticalAlignment" Value="Center" />
		<Setter Property="Margin" Value="5, 10, 5, 5" />
	</Style>
	<Style x:Key="dialogButton" TargetType="Button">
		<Setter Property="VerticalAlignment" Value="Center" />
		<Setter Property="Margin" Value="5, 10, 5, 5" />
		<Setter Property="Width" Value="72" />
	</Style>
	<Style TargetType="{x:Type TextBox}">
		<Setter Property="Validation.ErrorTemplate">
			<Setter.Value>
				<ControlTemplate>
					<DockPanel LastChildFill="True">
						<Ellipse DockPanel.Dock="Right" Margin="2,0"
							ToolTip="{Binding ElementName=adornerPlaceholder, 
									Path=AdornedElement.(Validation.Errors)[0].ErrorContent}"
							Width="10" Height="10">
							<Ellipse.Fill>
								<LinearGradientBrush>
									<GradientStop Color="#11FF1111" Offset="0" />
									<GradientStop Color="#FFFF0000" Offset="1" />
								</LinearGradientBrush>
							</Ellipse.Fill>
						</Ellipse>
						<!--<TextBlock DockPanel.Dock="Right" Foreground="Red"
								FontSize="16" FontWeight="Bold"
								ToolTip="{Binding ElementName=adornerPlaceholder, 
									Path=AdornedElement.(Validation.Errors)[0].ErrorContent}"
								Text=" !"/>-->
						<Border BorderBrush="Red" BorderThickness="2">
							<AdornedElementPlaceholder Name="adornerPlaceholder"/>
						</Border>
					</DockPanel>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
Russian Federation Russian Federation
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions