Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
Simple dialog using XamDialogWindow
posted

Hi,

It's not quite clear on how to use the XamDialogWindow. As such, the XamDialogWindow doesn't seem to be a normal" window replacement as it has to "live" into some container.

Let say I want to convert the following About dialog box to one using the XamDialogWindow, how would I do it?

<Window x:Class="Vizimax.Service.Client.Dialog.AboutDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:res="clr-namespace:Vizimax.Service.Client.Resources"
SizeToContent="WidthAndHeight"
WindowStyle="ToolWindow"
ResizeMode="NoResize"
ShowInTaskbar="False"
Title="{Binding Path=ApplicationName, StringFormat={x:Static res:Strings.AboutDialogTitle}}"
MinHeight="100" MinWidth="300"
>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image Grid.Row="0" Margin="10" Source="/Vizimax.Service.Client;component/Resources/Images/Logo.png" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Top" />
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="{Binding Path=Version}" FontFamily="Verdana" FontSize="11"/>
<Button Grid.Column="1" Margin="3" Content="{x:Static res:Strings.LabelOK}" IsDefault="True" Command="{Binding RelayCommandOK}"/>
</Grid>
</Grid>
</Window>