.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Imran Ghani
Post New Web Links

FocusManager IsFocusScope

Posted By:      Posted Date: October 22, 2010    Points: 0   Category :WPF
 

Hi

I have the following code:

<Window.Resources>
	<Style x:Key="myStyle" TargetType="{x:Type ButtonBase}">
		<Setter Property="Background" Value="#FFEAEEFC"/>
		<Setter Property="Height" Value="20"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ButtonBase}">
					<Border x:Name="bd" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" Margin="0,0,0,0" BorderThickness="1" BorderBrush="Gray">
						<StackPanel Orientation="Horizontal" Margin="8,0,0,0">
							<Image Height="20" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
							<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
						</StackPanel>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter TargetName="bd" Property="Background" Value="Red" />
						</Trigger>
						<Trigger Property="IsKeyboardFocused" Value=&


View Complete Post


More Related Resource Links

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend