When I apply this style to XamMaskedEditor I can not see the field value

MARIO / Tuesday, December 21, 2010

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<

Window x:Class

="MainWindow"

xmlns

="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x

="http://schemas.microsoft.com/winfx/2006/xaml"

Title="MainWindow" Height="350" Width="525" xmlns:igEditors

="http://infragistics.com/Editors">

<Window.Resources

>

 

 

<Style x:Key="roundTextBox" TargetType="{x:Type igEditors:XamMaskedEditor

}">

<Setter Property

="Template">

<Setter.Value

>

<ControlTemplate TargetType="{x:Type igEditors:XamMaskedEditor

}">

<Grid

>

<Border x:Name="BorderBase" Background="White" BorderThickness="1.4,1.4,1,1"

BorderBrush="Silver" CornerRadius

="10" />

<Label x:Name="TextPrompt" Content="{TemplateBinding Tag}" Visibility="Collapsed" Focusable="False" Foreground="Silver"></Label

>

</Grid

>

<ControlTemplate.Triggers

>

<MultiTrigger

>

<MultiTrigger.Conditions

>

<Condition Property="IsFocused" Value="False"></Condition

>

<Condition Property="Text" Value=""></Condition

>

</MultiTrigger.Conditions

>

<MultiTrigger.Setters

>

<Setter Property="Visibility" TargetName="TextPrompt" Value="Visible"></Setter

>

</MultiTrigger.Setters

>

</MultiTrigger

>

<Trigger Property="IsFocused" Value

="True">

<Setter Property="BorderThickness" TargetName="BorderBase" Value="2.4,2.4,1,1"></Setter

>

</Trigger

>

<Trigger Property="IsEnabled" Value

="False">

<Setter Property="Foreground" Value

="DimGray" />

</Trigger

>

</ControlTemplate.Triggers

>

</ControlTemplate

>

</Setter.Value

>

</Setter

>

</Style

>

</Window.Resources

>

<Grid

>

<TextBox Height="29" HorizontalAlignment="Left" Margin="91,91,0,0" Name="TextBox1" VerticalAlignment="Top" Width="113" Text="ciao" AcceptsReturn="True"

/>

<igEditors:XamMaskedEditor Height="24" HorizontalAlignment="Left" Margin="73,157,0,0" Name="XamMaskedEditor1" VerticalAlignment="Top" Width="163" Value="TEST WPF" UseLayoutRounding="False" Style="{StaticResource roundTextBox}" IsHitTestVisible="True" SnapsToDevicePixels="True"

/>

</Grid

>

</

Window

>