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
Post a Comment