title: Trying to adjust picture size based on device size
body: <p>I'm trying to adjust picture sizes on different sized devices on the UWP platform. But facing some issues on the code below. I'm trying to use Visual State Manager so that image size would be adjusted if opened on different sized devices</p>
  
  <pre><code>&lt;Setter Target="rowDefNavPanel" Value="0"&gt;&lt;/Setter&gt;
  &lt;Setter Target="imglearn.(width)" Value="180"/&gt;
  </code></pre>
  
  <p>Any help would be appreciated.
  Xaml code</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;Grid.Background&gt;
          &lt;ImageBrush Stretch="Fill" ImageSource="ms-appx:///Assets/Home/home_android.jpg"/&gt;
      &lt;/Grid.Background&gt;
      &lt;Grid.RowDefinitions&gt;            
          &lt;RowDefinition x:Name="rowDefNavPanel" Height="*"/&gt;            
      &lt;/Grid.RowDefinitions&gt;        
          &lt;RelativePanel x:Name="homepanel"&gt;            
              &lt;Image x:Name="imglearn" Source="Assets/Home/btn_learn_color.png"              
             HorizontalAlignment="Left"
             VerticalAlignment="Bottom"
             Margin="20,90,0,60"               
             Width="180" Height="200"  Stretch="Uniform"
             /&gt;
              &lt;Image x:Name="imgPaint" Source="Assets/Home/btn_paint.png"              
            RelativePanel.AlignLeftWith="imglearn"
             Margin="200,140,0,0"
             Width="180" Height="200"  Stretch="Uniform"
            /&gt;
              &lt;Image x:Name="imgQuiz" Source="Assets/Home/btn_quiz.png"              
             RelativePanel.AlignTopWithPanel="True"
             RelativePanel.AlignRightWithPanel="True"
             Margin="0,50,30,0"
             Width="180" Height="200" Stretch="Uniform"
             /&gt;
              &lt;Image x:Name="OtherApps" Source="Assets/Home/btn_other_app.png"              
             RelativePanel.AlignRightWithPanel="True"
             RelativePanel.AlignBottomWithPanel="True"
             Margin="0,0,30,0"
             Width="180" Height="200"  Stretch="Uniform"
             /&gt;
          &lt;/RelativePanel&gt;
  
      &lt;VisualStateManager.VisualStateGroups&gt;
          &lt;VisualStateGroup&gt;
              &lt;VisualState x:Name="vsState"&gt;
                  &lt;VisualState.StateTriggers&gt;
                      &lt;AdaptiveTrigger MinWindowWidth="0"/&gt;
                  &lt;/VisualState.StateTriggers&gt;
                  &lt;VisualState.Setters&gt;
                      &lt;Setter Target="rowDefNavPanel" Value="0"&gt;&lt;/Setter&gt;
                      &lt;Setter Target="imglearn.(width)" Value="180"/&gt;
                  &lt;/VisualState.Setters&gt;
              &lt;/VisualState&gt;
          &lt;/VisualStateGroup&gt;
      &lt;/VisualStateManager.VisualStateGroups&gt;      
  &lt;/Grid&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/yNFRW.jpg" alt="enter image description here"></p>