title: no template property on grid style in WPF?
body: <p>i want to move all the content of a <code>Grid</code> to a style/template/Container (don't know which one to choose...), but I tried to move it to a <code>Style</code>.</p>
  <p>but the problem is I get the error :</p>
  <blockquote>
  <p>&quot;Cannot find the Style Property 'Template' on the type
  'System.Windows.Controls.Grid'&quot;</p>
  </blockquote>
  <p>i know there is no <code>Template</code> property for <code>Grid</code> , but how else will I move the grid content to the ResourceDirectory file?</p>
  <p>This is the Grid code:</p>
  <pre><code>&lt;Grid  Grid.Column=&quot;0&quot;  Grid.Row=&quot;0&quot; Margin=&quot;10,15,5,5&quot; &gt;
          
          &lt;Border BorderThickness=&quot;7&quot; CornerRadius=&quot;4&quot;&gt;
              &lt;Border.BorderBrush&gt;
                  &lt;SolidColorBrush Color=&quot;#73B2F5&quot; Opacity=&quot;0.5&quot;/&gt;
              &lt;/Border.BorderBrush&gt;
              &lt;Grid&gt;
                  &lt;Grid.Background&gt;
                      &lt;SolidColorBrush Color=&quot;#73B2F5&quot; Opacity=&quot;0.5&quot;/&gt;
                  &lt;/Grid.Background&gt;
                  &lt;Grid.RowDefinitions&gt;
                      &lt;RowDefinition Height=&quot;30&quot;/&gt;
                      &lt;RowDefinition Height=&quot;1*&quot;/&gt;
                  &lt;/Grid.RowDefinitions&gt;
                  &lt;Button Name=&quot;CustomerButton&quot; Grid.Row=&quot;1&quot; Grid.Column=&quot;0&quot; Width=&quot;40&quot; Height=&quot;40&quot; Content=&quot;Customer&quot; Click=&quot;CustTabButton_Click&quot; &gt;&lt;/Button&gt;
                  &lt;Button Name=&quot;BossButton&quot; Grid.Row=&quot;1&quot; Width=&quot;40&quot; Height=&quot;40&quot; Content=&quot;Boss&quot; Margin=&quot;23,206,23,114&quot; Click=&quot;BossTabButton_Click&quot;&gt;&lt;/Button&gt;
              &lt;/Grid&gt;
          &lt;/Border&gt;
          
      &lt;/Grid&gt;
  </code></pre>
  <p>This is the code in the resourceDirectory after i move the code there:</p>
  <pre><code>&lt;Style x:Key=&quot;LeftSidePanel&quot; TargetType=&quot;{x:Type Grid}&quot;&gt;
      &lt;Setter Property=&quot;Margin&quot; Value=&quot;10,15,5,5&quot; /&gt;
      &lt;Setter Property=&quot;Template&quot;&gt;
          &lt;Setter.Value&gt;
              &lt;Border BorderThickness=&quot;7&quot; CornerRadius=&quot;4&quot;&gt;
                  &lt;Border.BorderBrush&gt;
                      &lt;SolidColorBrush Color=&quot;#73B2F5&quot; Opacity=&quot;0.5&quot;/&gt;
                  &lt;/Border.BorderBrush&gt;
                  &lt;Grid&gt;
                      &lt;Grid.Background&gt;
                          &lt;SolidColorBrush Color=&quot;#73B2F5&quot; Opacity=&quot;0.5&quot;/&gt;
                      &lt;/Grid.Background&gt;
                      &lt;Grid.RowDefinitions&gt;
                          &lt;RowDefinition Height=&quot;30&quot;/&gt;
                          &lt;RowDefinition Height=&quot;1*&quot;/&gt;
                      &lt;/Grid.RowDefinitions&gt;
                      &lt;Button Name=&quot;CustomerButton&quot; Grid.Row=&quot;1&quot; Grid.Column=&quot;0&quot; Width=&quot;40&quot; Height=&quot;40&quot; Content=&quot;Customer&quot; Click=&quot;CustTabButton_Click&quot;&gt;&lt;/Button&gt;
                      &lt;Button Name=&quot;BossButton&quot; Grid.Row=&quot;1&quot; Width=&quot;40&quot; Height=&quot;40&quot; Content=&quot;Boss&quot; Margin=&quot;23,206,23,114&quot; Click=&quot;BossTabButton_Click&quot;&gt;&lt;/Button&gt;
                  &lt;/Grid&gt;
              &lt;/Border&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  <p>What did i miss?</p>