Note that there are some explanatory texts on larger screens.

plurals
  1. POwhy can't I move a control within a tab in WPF designer?
    primarykey
    data
    text
    <p>I have a ComboBox within a tab and I can change its size, skew and rotation with the mouse. However, when I want to move it around, I'm not allowed to. To change the combobox's position, I have to manually enter the coordinates in the margin fields, which is really annoying. Why can't I simply move it by dragging it with the mouse?</p> <p><strong>UPDATE</strong></p> <p>This actually happens only in a second tab. In the first tab I can move around controls like expected. So I cut&amp;pasted the tab part in my xaml file in order to change the tab order. Now, I can move around controls in the first tab (former 2nd tab) whereas I can't move controls in the 2nd tab.</p> <p>Sounds like a WPF designer bug to me...</p> <p><strong>UPDATE 2</strong></p> <p>This is a simple test case. The TestComboBox in the 2nd tab can't be moved.</p> <pre><code>&lt;Window x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="718" Width="728" Background="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"&gt; &lt;TabControl HorizontalAlignment="Left" VerticalAlignment="Top"&gt; &lt;TabItem Header="TabItem"&gt; &lt;Grid Margin="0,10,0,4" Height="639" Width="708"&gt; &lt;/Grid&gt; &lt;/TabItem&gt; &lt;TabItem Header="TabItem" Height="23"&gt; &lt;Grid Margin="0,10,0,4" Height="639" Width="708"&gt; &lt;ComboBox x:Name="TestComboBox" HorizontalAlignment="Left" Margin="84,10,0,0" Width="217" VerticalAlignment="Top" Height="22"/&gt; &lt;/Grid&gt; &lt;/TabItem&gt; &lt;/TabControl&gt; &lt;/Window&gt; </code></pre> <p>After changing the tab order, TestComboBox can be moved:</p> <pre><code>&lt;Window x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="718" Width="728" Background="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"&gt; &lt;TabControl HorizontalAlignment="Left" VerticalAlignment="Top"&gt; &lt;TabItem Header="TabItem" Height="23"&gt; &lt;Grid Margin="0,10,0,4" Height="639" Width="708"&gt; &lt;ComboBox x:Name="TestComboBox" HorizontalAlignment="Left" Margin="84,10,0,0" Width="217" VerticalAlignment="Top" Height="22"/&gt; &lt;/Grid&gt; &lt;/TabItem&gt; &lt;TabItem Header="TabItem"&gt; &lt;Grid Margin="0,10,0,4" Height="639" Width="708"&gt; &lt;/Grid&gt; &lt;/TabItem&gt; &lt;/TabControl&gt; &lt;/Window&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload