Note that there are some explanatory texts on larger screens.

plurals
  1. POData Sources Window : override a UserControl's default size of 100*100
    primarykey
    data
    text
    <p>When specifying a custom control for a property in Data Sources Window, dropping that object onto the Window creates a control that is 100*100 in size. (There is no hard-coded size in the control.)</p> <p><img src="https://i.stack.imgur.com/JZ8ME.png" alt="enter image description here"></p> <p>Tried to match a Label's HorizontalContentAlignment and VerticalContentAlignment values as they seem to be the only ones differing but control size is indifferently 100*100. (unless I manually fix it)</p> <p><img src="https://i.stack.imgur.com/EqlJH.png" alt="enter image description here"></p> <p>Code generated by the wizard :</p> <pre><code>&lt;Label Content="Url:" Grid.Column="0" HorizontalAlignment="Left" Margin="3" Grid.Row="2" VerticalAlignment="Center"/&gt; &lt;HyperLinkControl x:Name="urlHyperLinkControl2" Grid.Column="1" HorizontalAlignment="Left" Height="100" Margin="3" Grid.Row="2" Uri="{Binding Url}" VerticalAlignment="Center" Width="100"/&gt; </code></pre> <p>Are there other properties that need to be defined in my UserControl for overriding that default size ?</p> <p>Generated XAML by the wizard :</p> <pre><code>&lt;Grid x:Name="grid1" DataContext="{StaticResource biographyViewSource}" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top"&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="Auto"/&gt; &lt;ColumnDefinition Width="Auto"/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;Label Content="Site:" Grid.Column="0" HorizontalAlignment="Left" Margin="3" Grid.Row="0" VerticalAlignment="Center"/&gt; &lt;TextBlock x:Name="siteTextBlock1" Grid.Column="1" HorizontalAlignment="Left" Margin="3" Grid.Row="0" Text="{Binding Site}" VerticalAlignment="Center"/&gt; &lt;Label Content="Text:" Grid.Column="0" HorizontalAlignment="Left" Margin="3" Grid.Row="1" VerticalAlignment="Center"/&gt; &lt;TextBlock x:Name="textTextBlock1" Grid.Column="1" HorizontalAlignment="Left" Margin="3" Grid.Row="1" Text="{Binding Text}" VerticalAlignment="Center"/&gt; &lt;Label Content="Url:" Grid.Column="0" HorizontalAlignment="Left" Margin="3" Grid.Row="2" VerticalAlignment="Center"/&gt; &lt;SharpControls:HyperLinkControl x:Name="urlHyperLinkControl2" Grid.Column="1" HorizontalAlignment="Left" Height="100" Margin="3" Grid.Row="2" Uri="{Binding Url}" VerticalAlignment="Center" Width="100"/&gt; &lt;Label Content="Attribution:" Grid.Column="0" HorizontalAlignment="Left" Margin="3" Grid.Row="3" VerticalAlignment="Center"/&gt; &lt;TextBlock x:Name="attributionTextBlock1" Grid.Column="1" HorizontalAlignment="Left" Margin="3" Grid.Row="3" Text="{Binding License.Attribution}" VerticalAlignment="Center"/&gt; &lt;Label Content="Type:" Grid.Column="0" HorizontalAlignment="Left" Margin="3" Grid.Row="4" VerticalAlignment="Center"/&gt; &lt;TextBlock x:Name="typeTextBlock1" Grid.Column="1" HorizontalAlignment="Left" Margin="3" Grid.Row="4" Text="{Binding License.Type}" VerticalAlignment="Center"/&gt; &lt;Label Content="Url:" Grid.Column="0" HorizontalAlignment="Left" Margin="3" Grid.Row="5" VerticalAlignment="Center"/&gt; &lt;SharpControls:HyperLinkControl x:Name="urlHyperLinkControl3" Grid.Column="1" HorizontalAlignment="Left" Height="100" Margin="3" Grid.Row="5" Uri="{Binding License.Url}" VerticalAlignment="Center" Width="100"/&gt; &lt;/Grid&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.
    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