0

How to Edit a control template XAML

Follow the following steps to edit control template or access it.

1. Open your .xaml file

2. Right click on your control

3. Click on Edit Template, then click on Edit Copy.

4. Then you can decide whether you want apply this template to only this control or apply all existing. Also Where you wanna define it

5. After this you will see the xaml code for that control, you can edit it the way you want !!

In Xaml go to your control, I have taken “Button” as my control

CreateButton

In Designer Right Click on the Button Control -> Edit Template -> Edit Copy.

 

EditCopy

Do you want to apply to all Buttons ? or create a new Style with custom Name(key) use it only one certain buttons ! Also Where do you want to define this style ?

SelectApplication

 

After you hit Okay you will see the Button Style Template !! Enjoy !!

0

Change ListView Selected Item’s Background Color

Often times, you will want to change the ListView’s selected Item’s Background color.

Here is how to do that ,

Just copy and paste this line in App.Xaml and your done !!

Basically we are overriding the default SelectedItemBackground color bye our custom color.

For default template of ListView you can go to:

https://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj709921.aspx

This applies to all the controls. Check out my note on How to edit a control’s template.