<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create small buttons with the Esri_Button style in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-small-buttons-with-the-esri-button/m-p/1213593#M8761</link>
    <description>&lt;P&gt;Karen, looks like there is a MinWidth set by the style so u have to override that. Here's an example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="min_width.png" style="width: 384px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51490i3932EE9F5FF0F9C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="min_width.png" alt="min_width.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;&amp;lt;UserControl x:Class="....&amp;gt;
  &amp;lt;UserControl.Resources&amp;gt;
    ...
  &amp;lt;/UserControl.Resources&amp;gt;
  &amp;lt;Grid&amp;gt;
    ...
    &amp;lt;WrapPanel Orientation="Horizontal" VerticalAlignment="Bottom"&amp;gt;
      &amp;lt;Button Content="30" Width="30" MinWidth="30" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="40" Width="40" MinWidth="40" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="50" Width="50" MinWidth="50" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="60" Width="60" MinWidth="60" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="70" Width="70" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="80" Width="80" Style="{DynamicResource Esri_Button}" Margin="2"
              VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="90" Width="90" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="100" Width="100" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
    &amp;lt;/WrapPanel&amp;gt;
  &amp;lt;/Grid&amp;gt;
&amp;lt;/UserControl&amp;gt;&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 16 Sep 2022 21:13:05 GMT</pubDate>
    <dc:creator>CharlesMacleod</dc:creator>
    <dc:date>2022-09-16T21:13:05Z</dc:date>
    <item>
      <title>How to create small buttons with the Esri_Button style</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-small-buttons-with-the-esri-button/m-p/1213004#M8747</link>
      <description>&lt;P&gt;When creating WPF buttons with the&amp;nbsp;Esri_Button style (i.e.,&amp;nbsp;Style="{DynamicResource Esri_Button}), the narrowest width allowed seems to be ~70.&amp;nbsp; In Visual Studio you can use smaller widths and the buttons show up as the correct size, but when you actually run the solution, the buttons always expand to around 70 wide.&amp;nbsp; Does anyone know a work around for this?&amp;nbsp; I have some small buttons that I would like to have match the Pro style, especially in the dark theme where the style differences seem to show up more.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 16:33:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-small-buttons-with-the-esri-button/m-p/1213004#M8747</guid>
      <dc:creator>KarenMeinstein</dc:creator>
      <dc:date>2022-09-15T16:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create small buttons with the Esri_Button style</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-small-buttons-with-the-esri-button/m-p/1213593#M8761</link>
      <description>&lt;P&gt;Karen, looks like there is a MinWidth set by the style so u have to override that. Here's an example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="min_width.png" style="width: 384px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51490i3932EE9F5FF0F9C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="min_width.png" alt="min_width.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;&amp;lt;UserControl x:Class="....&amp;gt;
  &amp;lt;UserControl.Resources&amp;gt;
    ...
  &amp;lt;/UserControl.Resources&amp;gt;
  &amp;lt;Grid&amp;gt;
    ...
    &amp;lt;WrapPanel Orientation="Horizontal" VerticalAlignment="Bottom"&amp;gt;
      &amp;lt;Button Content="30" Width="30" MinWidth="30" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="40" Width="40" MinWidth="40" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="50" Width="50" MinWidth="50" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="60" Width="60" MinWidth="60" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="70" Width="70" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="80" Width="80" Style="{DynamicResource Esri_Button}" Margin="2"
              VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="90" Width="90" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
      &amp;lt;Button Content="100" Width="100" Style="{DynamicResource Esri_Button}" Margin="2" VerticalAlignment="Center"/&amp;gt;
    &amp;lt;/WrapPanel&amp;gt;
  &amp;lt;/Grid&amp;gt;
&amp;lt;/UserControl&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 16 Sep 2022 21:13:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-small-buttons-with-the-esri-button/m-p/1213593#M8761</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2022-09-16T21:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create small buttons with the Esri_Button style</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-small-buttons-with-the-esri-button/m-p/1213609#M8763</link>
      <description>&lt;P&gt;I agree with Charlie, it appears that the Esri_Button style sets the MinWidth to 70.&amp;nbsp; So out-of-box the following XAML results in this UI representation:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_0-1663366686347.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51492i997C14B2AFDA8726/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_0-1663366686347.png" alt="Wolf_0-1663366686347.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;XAML:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Button Grid.Column="1" HorizontalAlignment="Left" 
        Style="{DynamicResource Esri_Button}" Command="{Binding OpenProjectCmd}" &amp;gt;
  &amp;lt;Image Source="Images\ArcGISProjectOpen16.png" Width="16" Height="16" /&amp;gt;
&amp;lt;/Button&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;If you set the following Button tag attributes: 'MinWidth', 'MinHeight' and 'Padding' the Button's inner elements will determine the width/height:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Button Grid.Column="1" HorizontalAlignment="Left" MinWidth="0" MinHeight="0" Padding="0"
        Style="{DynamicResource Esri_Button}" Command="{Binding OpenProjectCmd}" &amp;gt;
  &amp;lt;Image Source="Images\ArcGISProjectOpen16.png" Width="16" Height="16" /&amp;gt;
&amp;lt;/Button&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;So now the UI looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_1-1663367018477.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51493i3A4E785FB95BBE29/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_1-1663367018477.png" alt="Wolf_1-1663367018477.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The reason why the Visual Studio XAML designer is not really&amp;nbsp;&lt;SPAN&gt;WYSIWYG&amp;nbsp;is because the XAML designer is not able to locate various Pro assemblies during design time, hence any ArcGIS Pro styles look different in the XAML designer versus when Pro is running.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 22:30:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-small-buttons-with-the-esri-button/m-p/1213609#M8763</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2022-09-16T22:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create small buttons with the Esri_Button style</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-small-buttons-with-the-esri-button/m-p/1213925#M8768</link>
      <description>&lt;P&gt;Thanks so much!&amp;nbsp; Your post plus Wolf's additional info solved this for me!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 18:58:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-small-buttons-with-the-esri-button/m-p/1213925#M8768</guid>
      <dc:creator>KarenMeinstein</dc:creator>
      <dc:date>2022-09-19T18:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to create small buttons with the Esri_Button style</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-small-buttons-with-the-esri-button/m-p/1213926#M8769</link>
      <description>&lt;P&gt;Thanks so much!&amp;nbsp; That's very helpful!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 18:57:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-create-small-buttons-with-the-esri-button/m-p/1213926#M8769</guid>
      <dc:creator>KarenMeinstein</dc:creator>
      <dc:date>2022-09-19T18:57:03Z</dc:date>
    </item>
  </channel>
</rss>

