Control Templates In WPF

preview_player
Показать описание
Hey Guys, Let us learn about the concept of templates in WPF which form a important of displaying data and controls. In this lecture I will talk about control templates and in coming up lectures we will liik into what are data templates in WPF. Thanks and please like subscribe and share.
Рекомендации по теме
Комментарии
Автор

One of the best and very precise tutorial on wpf I have found so far. All of your tutorials on wpf are really good. Thank you.

ritasrivastava
Автор

Hi, I'm a beginner to WPF really awesome tutorial for the beginners the way you explained in the tutorial is crystal clear. You explained each and everything even a minute one. I completed your tutorial learned a lot . I'm requesting you to put more tutorial for beginners thanks awesome :-)

vigneshr
Автор

Very good core article to learn quickly n clear understanding also very much practical.

ravigupta
Автор

Thank you for the wonderful series, Subscribed:) please make another set of video tutorials on Threads in WPF.

Shwetha-sodn
Автор

Thanks man, I stuck on <ControlTemplate> when tried to make it for all buttons before I found your video ;)

redditcamp
Автор

I have a query regarding the use of grid before the "ellipse" tag. Can you please help explain me why we are using another grid here ?

ayeshkantmishra
Автор

I love your tutorials! You're right, .Net is cool^^
What I don't like is your IDE - please use darkmode! White looks so strange.

Kappe
Автор

Does this mean every button I create will have exactly the same properties? Can u use basedon here as well?

dgloria
Автор

Please use Blog to post the codes & text matters of Slides.

This will help us a

devkantkumar
Автор

Nice Video... I have one question if we want to apply this Syle with control template using Key then how can we do this.
<Button.Style>
<Style TargetType="Button" Resources="{StaticResource ButtonTemplate}"/>
</Button.Style>
Getting error in above code "{"Unable to cast object of type 'System.Windows.Style' to type

vishalsaini-pyyd
Автор

when I created it in window.resources without styles, then also it is working fine... Please clear why we are creating it in styles. My code:
<Window.Resources>
<ControlTemplate TargetType="Button" x:Key="myTemplate">
<Grid>
<Ellipse Fill="Red"/>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
</ControlTemplate>
</Window.Resources>

<Grid>
<Button Height="30" Width="150" Content="I am button" Template="{StaticResource myTemplate}" />
</Grid>

shilpimittal
Автор

Change the color and fontweight and border, when mouse is over:

<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid>
<Ellipse Fill="LightGreen"/>
<Border x:Name="Border" CornerRadius="100" BorderThickness="3" Background="LightGreen" BorderBrush="BlueViolet" >
<ContentPresenter Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True"/>
</Border>
<ContentPresenter HorizontalAlignment="Center"

</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>

Trzbne
Автор

Your accent is so THICK! If I were you I would try to work on your accent, because it's very hard to understand what you are saying sometimes. You speak very quick as well.

CanadianMang