<?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 : can't stretch ComboBox with StackPanel in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038409#M37156</link>
    <description>&lt;P&gt;Hi gile,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it is the same without stretching to right at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    &amp;lt;Grid&amp;gt;
        &amp;lt;Grid HorizontalAlignment="Left" VerticalAlignment="Top" &amp;gt;
                &amp;lt;TextBox x:Name="TextBox1" Margin="0,0,0,0" Width="65" Height="22"&amp;gt;&amp;lt;/TextBox&amp;gt;
                &amp;lt;ComboBox x:Name="ComboBox1" Margin="65,0,-175,0" Height="22" SelectedIndex="0" HorizontalAlignment="Stretch"&amp;gt;&amp;lt;/ComboBox&amp;gt;
       &amp;lt;/Grid&amp;gt;
   &amp;lt;/Grid&amp;gt; &lt;/PRE&gt;</description>
    <pubDate>Sun, 14 Feb 2016 12:42:19 GMT</pubDate>
    <dc:creator>J-Rocks</dc:creator>
    <dc:date>2016-02-14T12:42:19Z</dc:date>
    <item>
      <title>can't stretch ComboBox with StackPanel</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038370#M37153</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't stretch ComboBox &amp;amp; TextBox when I add them into StackPanel to be in one line.&lt;/P&gt;&lt;P&gt;I can control the ComboBox if it is outside StackPanel otherwise properites can not effect them while they are in StackPanel.&lt;/P&gt;&lt;P&gt;Is there any solution for this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    &amp;lt;Grid&amp;gt;
        &amp;lt;StackPanel &amp;gt;
            &amp;lt;StackPanel Orientation="Horizontal"&amp;gt;
                &amp;lt;TextBox x:Name="TextBox1" Width="65"&amp;gt;&amp;lt;/TextBox&amp;gt;
                &amp;lt;ComboBox x:Name="ComboBox1" Height="22" SelectedIndex="0"&amp;gt;&amp;lt;/ComboBox&amp;gt;
            &amp;lt;/StackPanel&amp;gt;            
        &amp;lt;/StackPanel&amp;gt;                
    &amp;lt;/Grid&amp;gt;  &lt;/PRE&gt;</description>
      <pubDate>Sun, 14 Feb 2016 11:06:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038370#M37153</guid>
      <dc:creator>J-Rocks</dc:creator>
      <dc:date>2016-02-14T11:06:39Z</dc:date>
    </item>
    <item>
      <title>Re : can't stretch ComboBox with StackPanel</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038384#M37154</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you try using a Grid instead ?&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2016 11:56:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038384#M37154</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-02-14T11:56:20Z</dc:date>
    </item>
    <item>
      <title>Re : can't stretch ComboBox with StackPanel</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038408#M37155</link>
      <description>&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    &amp;lt;Grid&amp;gt;
        &amp;lt;StackPanel &amp;gt;
            &amp;lt;Grid&amp;gt;
                &amp;lt;Grid.ColumnDefinitions&amp;gt;
                    &amp;lt;ColumnDefinition Width="Auto"/&amp;gt;
                    &amp;lt;ColumnDefinition Width="*"/&amp;gt;
                &amp;lt;/Grid.ColumnDefinitions&amp;gt;
                &amp;lt;TextBox x:Name="TextBox1" Grid.Column="0" Width="65" Margin="5"/&amp;gt;
                &amp;lt;ComboBox x:Name="ComboBox1" Grid.Column="1" Height="22" Margin="5" SelectedIndex="0"&amp;gt;&amp;lt;/ComboBox&amp;gt;
            &amp;lt;/Grid&amp;gt;
        &amp;lt;/StackPanel&amp;gt;
    &amp;lt;/Grid&amp;gt;&lt;/PRE&gt;
&lt;P&gt;PS: with WPF, it's a good practice to avoid naming the controls and use bindings instead.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2016 12:41:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038408#M37155</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-02-14T12:41:30Z</dc:date>
    </item>
    <item>
      <title>Re : can't stretch ComboBox with StackPanel</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038409#M37156</link>
      <description>&lt;P&gt;Hi gile,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it is the same without stretching to right at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    &amp;lt;Grid&amp;gt;
        &amp;lt;Grid HorizontalAlignment="Left" VerticalAlignment="Top" &amp;gt;
                &amp;lt;TextBox x:Name="TextBox1" Margin="0,0,0,0" Width="65" Height="22"&amp;gt;&amp;lt;/TextBox&amp;gt;
                &amp;lt;ComboBox x:Name="ComboBox1" Margin="65,0,-175,0" Height="22" SelectedIndex="0" HorizontalAlignment="Stretch"&amp;gt;&amp;lt;/ComboBox&amp;gt;
       &amp;lt;/Grid&amp;gt;
   &amp;lt;/Grid&amp;gt; &lt;/PRE&gt;</description>
      <pubDate>Sun, 14 Feb 2016 12:42:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038409#M37156</guid>
      <dc:creator>J-Rocks</dc:creator>
      <dc:date>2016-02-14T12:42:19Z</dc:date>
    </item>
    <item>
      <title>Re : can't stretch ComboBox with StackPanel</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038416#M37157</link>
      <description>&lt;P&gt;A Grid is quite useless until you do not define ColumnDefinitions and/or RowDefinitions.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2016 12:48:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038416#M37157</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-02-14T12:48:53Z</dc:date>
    </item>
    <item>
      <title>Re : can't stretch ComboBox with StackPanel</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038420#M37158</link>
      <description>&lt;P&gt;Very good ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Binding is something over my head now, and it could be the next thing to learn soon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's if I waned to add a new TextBox below the first grid and make it stretch as well as the comboBox ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2016 12:53:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038420#M37158</guid>
      <dc:creator>J-Rocks</dc:creator>
      <dc:date>2016-02-14T12:53:32Z</dc:date>
    </item>
    <item>
      <title>Re : can't stretch ComboBox with StackPanel</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038430#M37159</link>
      <description>&lt;P&gt;You can use a StackPanel with default Orientation (i.e. Vertical)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    &amp;lt;StackPanel &amp;gt;
        &amp;lt;Grid&amp;gt;
            &amp;lt;Grid.ColumnDefinitions&amp;gt;
                &amp;lt;ColumnDefinition Width="Auto"/&amp;gt;
                &amp;lt;ColumnDefinition Width="*"/&amp;gt;
            &amp;lt;/Grid.ColumnDefinitions&amp;gt;
            &amp;lt;TextBox x:Name="TextBox1" Grid.Column="0" Width="65" Margin="5"/&amp;gt;
            &amp;lt;ComboBox x:Name="ComboBox1" Grid.Column="1" Height="22" Margin="5" SelectedIndex="0"&amp;gt;&amp;lt;/ComboBox&amp;gt;
        &amp;lt;/Grid&amp;gt;
        &amp;lt;TextBox x:Name="TextBox2" Grid.Column="0" Margin="5" HorizontalAlignment="Stretch"/&amp;gt;
    &amp;lt;/StackPanel&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Or a Grid&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    &amp;lt;Grid&amp;gt;
        &amp;lt;Grid.RowDefinitions&amp;gt;
            &amp;lt;RowDefinition Height="Auto"/&amp;gt;
            &amp;lt;RowDefinition Height="Auto"/&amp;gt;
        &amp;lt;/Grid.RowDefinitions&amp;gt;
        &amp;lt;Grid Grid.Row="0"&amp;gt;
            &amp;lt;Grid.ColumnDefinitions&amp;gt;
                &amp;lt;ColumnDefinition Width="Auto"/&amp;gt;
                &amp;lt;ColumnDefinition Width="*"/&amp;gt;
            &amp;lt;/Grid.ColumnDefinitions&amp;gt;
            &amp;lt;TextBox x:Name="TextBox1" Grid.Column="0" Width="65" Margin="5"/&amp;gt;
            &amp;lt;ComboBox x:Name="ComboBox1" Grid.Column="1" Height="22" Margin="5" SelectedIndex="0"&amp;gt;&amp;lt;/ComboBox&amp;gt;
        &amp;lt;/Grid&amp;gt;
        &amp;lt;TextBox Grid.Row="1" x:Name="TextBox2" Grid.Column="0" Margin="5"/&amp;gt;
    &amp;lt;/Grid&amp;gt;&lt;/PRE&gt;
&lt;P&gt;You should read almost &lt;A href="https://msdn.microsoft.com/en-us/library/bb514628%28v=vs.90%29.aspx" target="_self"&gt;&lt;STRONG&gt;this&lt;/STRONG&gt;&lt;/A&gt; about WPF containers.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2016 13:08:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038430#M37159</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-02-14T13:08:58Z</dc:date>
    </item>
    <item>
      <title>Re : can't stretch ComboBox with StackPanel</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038443#M37160</link>
      <description>&lt;P&gt;Your beautiful examples encouraged me to read and do more examples with Grid ,StackPanel .... Containers in general.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks gile&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2016 13:27:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-t-stretch-combobox-with-stackpanel/m-p/6038443#M37160</guid>
      <dc:creator>J-Rocks</dc:creator>
      <dc:date>2016-02-14T13:27:03Z</dc:date>
    </item>
  </channel>
</rss>

