c# - How can I define control as a resource and then place it onto form? -


i want this:

<window x:class="wpfapplication10.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">     <window.resources>         <button x:key="butt" content="yeah!" />     </window.resources>     <grid>         <!-- place button here -->     </grid> </window> 

how it? want create library of small user controls in single file.

<grid>     <staticresource resourcekey="butt"/> </grid> 

should work...


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -