|
<Application x:Class="AdventureWorks.Client.WPF.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xom="clr-namespace:Xomega.Framework;assembly=Xomega.Framework"
StartupUri="_EmployeeSearch.xaml" Startup="Application_Startup" DispatcherUnhandledException="Application_DispatcherUnhandledException">
<Application.Resources>
<Style x:Key="RadioButtonListStyle" TargetType="{x:Type ListBox}">
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="{x:Type ListBoxItem}" >
<Setter Property="Margin" Value="2" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}" >
<RadioButton Focusable="False" IsChecked="{Binding Path=IsSelected,
Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
<ContentPresenter></ContentPresenter>
</RadioButton>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Key="validationTemplate">
<DockPanel>
<TextBlock Foreground="Red" Text="*" FontSize="18" FontWeight="Bold"
ToolTip="{Binding ElementName=adornerPlaceholder, Path=AdornedElement.(xom:Property.Validation).Errors.ErrorsText}" />
<AdornedElementPlaceholder Name="adornerPlaceholder"/>
</DockPanel>
</ControlTemplate>
<Style x:Key="LabelStyle" TargetType="{x:Type Label}">
<Style.Triggers>
<Trigger Property="xom:Property.Required" Value="True">
<Setter Property="FontWeight" Value="Bold"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="OperatorStyle" TargetType="{x:Type ComboBox}">
<Setter Property="Margin" Value="5"/>
<Setter Property="VerticalAlignment" Value="Top"/>
</Style>
<Style x:Key="ControlStyle" TargetType="{x:Type FrameworkElement}">
<Setter Property="Margin" Value="5"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource validationTemplate}"/>
</Style>
<Style x:Key="CriteriaStyle" TargetType="{x:Type Control}">
<Setter Property="Margin" Value="5"/>
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource validationTemplate}"/>
</Style>
</Application.Resources>
</Application>
|
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.
Xomega Team is striving to increase productivity and development quality by utilizing Model Driven Development coupled with Code Generation and the best design practices for application development.
We provide MDD tools, code generators and frameworks for Visual Studio and .Net development.
Visit us at
http://www.xomega.net