Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The following XAML will give you the effect you are looking for.</p> <p>Note that I have doubled the DLU units in the markup - thus keeping the same aspect. It looked funny having a Button height of 14units. You may need to tinker with the figures presented in the market.</p> <p>Also, I started to remove some of the "Vista Layout" into separate styles. You may be able to continue down this path so you have quite a reusable set of styles which follow the Vista guidelines. I'm fairly sure some other people have done something similar.</p> <p>Furthermore, I took some liberties with the size of the dialog. You mentioned you wanted 210x96units - you would need to set this amount, plus the window chrome.</p> <p>Anyway, on with the content:</p> <pre><code> &lt;Window x:Class="VistaLayout.Dialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Delete File" ResizeMode="NoResize" Height="212" Width="430"&gt; &lt;Window.Resources&gt; &lt;Style x:Key="FooterButtonStyle" TargetType="{x:Type Button}"&gt; &lt;Setter Property="Width" Value="100" /&gt; &lt;Setter Property="Height" Value="28" /&gt; &lt;Setter Property="Margin" Value="8,0,0,0" /&gt; &lt;/Style&gt; &lt;Style x:Key="FooterPanelStyle" TargetType="{x:Type UniformGrid}"&gt; &lt;Style.Resources&gt; &lt;Style TargetType="{x:Type Button}" BasedOn="{StaticResource FooterButtonStyle}" /&gt; &lt;/Style.Resources&gt; &lt;Setter Property="Rows" Value="1" /&gt; &lt;Setter Property="HorizontalAlignment" Value="Right" /&gt; &lt;/Style&gt; &lt;/Window.Resources&gt; &lt;DockPanel Margin="14"&gt; &lt;!-- Footer --&gt; &lt;UniformGrid DockPanel.Dock="Bottom" Style="{StaticResource FooterPanelStyle}"&gt; &lt;Button&gt;_Yes&lt;/Button&gt; &lt;Button&gt;_No&lt;/Button&gt; &lt;/UniformGrid&gt; &lt;!-- Main Content --&gt; &lt;Grid&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;ColumnDefinition Width="8" /&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Image Width="64" /&gt; &lt;StackPanel Grid.Column="2"&gt; &lt;TextBlock Margin="0,6,0,14"&gt;Are you sure you want to move this file to the Recycle Bin?&lt;/TextBlock&gt; &lt;Grid&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;ColumnDefinition Width="14" /&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Image Width="60" /&gt; &lt;StackPanel Grid.Column="2"&gt; &lt;TextBlock&gt;117__6.jpg&lt;/TextBlock&gt; &lt;TextBlock&gt;Type: ACDSee JPG Image&lt;/TextBlock&gt; &lt;TextBlock&gt;Rating: Unrated&lt;/TextBlock&gt; &lt;TextBlock&gt;Dimensions: 1072 × 712&lt;/TextBlock&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; &lt;/DockPanel&gt; &lt;/Window&gt; </code></pre> <p>As with most XAML, this could be done in a myriad of ways - this is only one solution.</p> <p>Hope this helps!</p>
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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