title: Xamarin Forms convert Xaml to common resource style Yummy PancakeView
body: <p>I am trying to convert my properties of a pancake control into a style so all my pancake controls are styled the same.  This is what my XAML looks like.</p>
  <pre><code>    &lt;yummy:PancakeView x:Name=&quot;pvMEssage&quot; BackgroundColor=&quot;{DynamicResource ExceptionBackground}&quot; CornerRadius=&quot;0,0,20,20&quot; HorizontalOptions=&quot;FillAndExpand&quot; VerticalOptions=&quot;FillAndExpand&quot;
                         Padding=&quot;0,0,0,0&quot; Margin=&quot;0,0,0,0&quot;&gt;
          &lt;yummy:PancakeView.BackgroundGradientStops StartPoint=&quot;0,0&quot; EndPoint=&quot;0,0&quot;&gt;
              &lt;yummy:GradientStop Offset=&quot;0.1&quot; Color=&quot;{DynamicResource ExceptionBackground}&quot; /&gt;
          &lt;/yummy:PancakeView.BackgroundGradientStops&gt;
          &lt;yummy:PancakeView.Border&gt;
              &lt;yummy:Border Color=&quot;White&quot; Thickness=&quot;2&quot; /&gt;
          &lt;/yummy:PancakeView.Border&gt;
  </code></pre>
  <p>I know how to use setter.value in a style but I cannot figure out how to put the backgroundgradientstops in the style.</p>
  <p>I have this so far:</p>
  <pre><code>            &lt;Style x:Key=&quot;PancakeViewTop&quot; TargetType=&quot;yummy:PancakeView&quot;&gt;
              &lt;Setter Property=&quot;CornerRadius&quot; Value=&quot;20,20,0,0&quot; /&gt;
              &lt;Setter Property=&quot;HorizontalOptions&quot; Value=&quot;FillAndExpand&quot; /&gt;
              &lt;Setter Property=&quot;VerticalOptions&quot; Value=&quot;FillAndExpand&quot; /&gt;
              &lt;Setter Property=&quot;Padding&quot; Value=&quot;0,0,0,0&quot; /&gt;
              &lt;Setter Property=&quot;Margin&quot; Value=&quot;0,0,0,0&quot; /&gt;
              &lt;Setter Property=&quot;BackgroundGradientStartPoint&quot; Value=&quot;0,0&quot; /&gt;
              &lt;Setter Property=&quot;BackgroundGradientEndPoint&quot; Value=&quot;0,0&quot; /&gt;
              &lt;Setter Property=&quot;BackgroundGradientStops&quot;&gt;
                  &lt;Setter.Value&gt;
                      &lt;yummy:GradientStop Offset=&quot;0.1&quot; Color=&quot;{DynamicResource ExceptionBackground}&quot; /&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
              &lt;Setter Property=&quot;Border&quot;&gt;
                  &lt;Setter.Value&gt;
                      &lt;yummy:Border Color=&quot;White&quot; Thickness=&quot;2&quot; /&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/Style&gt;
  </code></pre>
  <p>but I get an error on these lines</p>
  <pre><code>&lt;Setter Property=&quot;BackgroundGradientStops&quot;&gt;
      &lt;Setter.Value&gt;
  </code></pre>
  <p>that states &quot;The specified value cannot be assigned.  The following type was expected: &quot;GradientStopCollection&quot;</p>