Custom Window Chrome in WPF

About a month ago I posted a teaser video that I would be doing a screencast on developing a fully functional custom window chrome for WPF. Well, it's here. I did miss my mark by 8 days though, I had originally wanted to complete it by the 1st. Anyways, here's the demo source code for the video.

Screencast Code:
Custom Window Chrome Demo_2013-03-09 21-35-24Z

111 Comments

  1. Pingback: golf cart rental isla mujeres

  2. Pingback: clima en atizapán de zaragoza

  3. Pingback: minnect expert

  4. Pingback: elizabeth kerr

  5. Pingback: levitinfo.wordpress.com

  6. Pingback: viagra pills over the counter

  7. Pingback: order cialis online

  8. Pingback: viagra buy over counter

  9. Pingback: kamagra jelly pack

  10. Pingback: order sildenafil for sale

  11. Pingback: imrotab 12

  12. Pingback: famvir 250 mg price

  13. Pingback: buy cenforce 150 with credit card

  14. Pingback: French Bulldog Rescue

  15. Pingback: French Bulldog Rescue

  16. Pingback: French Bulldog Rescue

  17. Pingback: rent a yacht in cancun

  18. Pingback: french pitbull

  19. Pingback: Instagram URL Shortener

  20. Pingback: Dog Registry

  21. Pingback: Dog Papers

  22. Pingback: Dog Registry

  23. Pingback: Dog Papers

  24. Pingback: Dog Registry

  25. Pingback: Dog Registry

  26. Pingback: Dog Papers

  27. Pingback: Dog Registry

  28. Pingback: Dog Papers

  29. Pingback: Dog Registry

  30. Pingback: Dog Registry

  31. Pingback: Dog Papers

  32. Pingback: Dog Registry

  33. Pingback: Dog Registry

  34. Pingback: Dog Registry

  35. Pingback: How To Obtain Dog Papers

  36. Pingback: Dog Breed Registries

  37. Pingback: Dog Breed Registries

  38. Pingback: How To Obtain Dog Papers

  39. Pingback: Dog Papers

  40. Pingback: How To Get My Dog Papers

  41. Pingback: clomidzsu.com

  42. Pingback: dapoxetineus.com

  43. Pingback: lipipzdfrty.com

  44. Pingback: otcalbuterol.com

  45. Pingback: vidalista 60 mg price

  46. Pingback: commander cialis en belgique

  47. Pingback: floodle

  48. Pingback: probiotics for french bulldogs

  49. Pingback: frenchie yorkie mix

  50. Pingback: wix seo

  51. Pingback: linh

  52. Pingback: culiacan clima

  53. Pingback: clima cancún

  54. Pingback: mexican candy near me

  55. Pingback: bjj jiu jitsu cypress texas

  56. Pingback: bjj jiu jitsu magnolia texas

  57. Pingback: french bulldog

  58. Pingback: brazilian jiu jitsu in houston

  59. Pingback: magnolia bjj

  60. Pingback: crypto news

  61. Pingback: sui

  62. Pingback: gaming

  63. Pingback: chanel bucket hat

  64. Pingback: french bulldog puppies for sale in texas

  65. Pingback: french bulldog texas

  66. Pingback: linh hoang

  67. Pingback: mexican candy store near me

  68. Pingback: mexican candy store near me

  69. Pingback: mexican candy store near me

  70. Pingback: mexican candy store near me

  71. Pingback: mexican candy store near me

  72. Pingback: mexican candy store near me

  73. Pingback: mexican candy store near me

  74. Pingback: mexican candy store near me

  75. Pingback: we buy dogs

  76. Pingback: dog probiotic

  77. Pingback: massachusetts boston terriers

  78. Pingback: 늑대닷컴

  79. Pingback: family ho

  80. Pingback: 늑대닷컴

  81. Pingback: french bulldogs to rescue

  82. Pingback: alexa collins

  83. Pingback: hairdresser in houston

  84. Pingback: french bulldog blue color

  85. Pingback: lilac frenchies

  86. Pingback: black frenchies

  87. Pingback: french bulldog puppies for sale $200

  88. Pingback: best french bulldog breeder

  89. Pingback: rent a yacht in cancun

  90. Pingback: isla mujeres condo

  91. Pingback: mexican candy store

  92. Pingback: download rust cheats

  93. Pingback: securecheats halo hacks

  94. Pingback: download hunt cheats

  95. Pingback: securecheats xdefiant hacks

  96. Pingback: aimbot vanguard

  97. Pingback: undetected battlebit hacks

  98. Pingback: micro french bulldog

  99. Pingback: french bulldog puppies near me

  100. Pingback: designer dogs

  101. Pingback: french bulldog rescue

  102. Pingback: clima en chimalhuacan

  103. Pingback: best probiotic for french bulldogs

  104. Pingback: esports domain

  105. Pingback: FB URL Shortener

  106. Thomas Heinze

    Hi David,

    nice tutorial. I’ve working your CustomWindow in my Application.
    Now I want to add a resizegrip for the template but if i add the resizegrip in the template

    I had a white resizegrip on the right site. How can i change that.

    Thanks Thomas

  107. Eugene

    Hello David

    Thanks for the great tutorial, I have been searching for hours with nothing close to what you created.

    There is one thing I am struggling with. If Window’s taskbar is set to autohide, then I cannot bring it back up by taking the mouse pointer to the bottom of the screen as with other programs. With normal WPF window it does work however, so I am guessing there is some windows parameter missing or something.

    Thanks again.

    http://windows.microsoft.com/en-za/windows/show-hide-taskbar#1TC=windows-7

  108. Sertan

    Not sure if this is still relevant but replying just in case it might help. Without an adorner layer, adorners will not render. Adorner layer can be on the control or parent / grandparents of the control in the visual tree.
    In this case if you wrap with , Adorners used inside the window will render as expected.

  109. Sushil

    Got it working! Thanks for your useful suggestion.
    One more issue with custom chrome I was not able to use adorner layer in order to resize controls on the fly.

  110. Sushil

    Hi David,

    Thanks for creating this video as it is quite useful. Could you please tell me how can create sub a sub window/User Control with this chrome. I tried to create a second window but it is throwing “Window must be the root of the tree. Cannot add Window as a child of ” error. Someone told me that I can use User Control to do that but again I getting default window chrome. Please Help.

    1. David Anderson (Post author)

      You have to do something like:

      public class CustomWindow : Window { }
      public class SubClassedWindow : CustomWindow { }

      <myXmlNs:SubClassedWindow> …

      There isn’t such a thing as Xaml inheritance unfortunately, and you can’t nest a Window in Xaml, it must be the outer most Xaml element in the Visual Tree.

Leave a Comment