view Messaging/Server/UI/MainWindow.xaml @ 65:5d0c5cc83a7a

Click event handler added
author Steven Hollidge <stevenhollidge@hotmail.com>
date Sun, 22 Apr 2012 14:21:33 +0100
parents c8c79f05d76f
children
line wrap: on
line source

<metro:Window x:Class="Server.UI.MainWindow"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:c="clr-namespace:Common.Controls;assembly=Common"
              xmlns:converters="clr-namespace:Server.Converters"
              xmlns:metro="http://schemas.codeplex.com/elysium/theme"
              xmlns:Xaml="clr-namespace:Common.Xaml;assembly=Common"
              Title="Messaging Server"
              Width="700"
              Height="475"
              MinWidth="700"
              MinHeight="475"
              DataContext="{Binding MainWindowViewModel,
                                    Source={StaticResource Locator}}"
              Icon="mail.ico">


    <TabControl Margin="{Binding Source={x:Static metro:Parameters.Instance}, Path=BoldPadding, Mode=OneWay}">
        <TabItem Header="dashboard">
            <Grid HorizontalAlignment="Center">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="220" />
                    <ColumnDefinition Width="220" />
                    <ColumnDefinition Width="220" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="220" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="50" />
                </Grid.RowDefinitions>

                <ToggleButton Grid.Row="0"
                              Grid.Column="0"
                              Margin="10,10,10,0"
                              Content="{Binding MsmqEndPoint.IsListening,
                                                Converter={converters:ToggleButtonToTextConverter}}"
                              IsChecked="{Binding MsmqEndPoint.IsListening}"
                              IsEnabled="True"
                              IsThreeState="False" />

                <ToggleButton Grid.Row="0"
                              Grid.Column="1"
                              Margin="10,10,10,0"
                              Content="{Binding RabbitEndPoint.IsListening,
                                                Converter={converters:ToggleButtonToTextConverter}}"
                              IsChecked="{Binding RabbitEndPoint.IsListening}"
                              IsEnabled="True" />

                <ToggleButton Grid.Row="0"
                              Grid.Column="2"
                              Margin="10,10,10,0"
                              Content="{Binding ZeroMqEndPoint.IsListening,
                                                Converter={converters:ToggleButtonToTextConverter}}"
                              IsChecked="{Binding ZeroMqEndPoint.IsListening}"
                              IsEnabled="True" />

                <c:MetroTile Grid.Row="1"
                             Grid.Column="0"
                             Margin="10"
                             DisplayCount="{Binding MsmqEndPoint.DisplayCount}"
                             DisplayIcon="mail.ico"
                             DisplayText="{Binding MsmqEndPoint.DisplayText}"
                             ToolTip="{Binding MsmqEndPoint.ToolTip}" />


                <c:MetroTile Grid.Row="1"
                             Grid.Column="1"
                             Margin="10"
                             Background="{StaticResource MetroGreenBrush}"
                             DisplayCount="{Binding RabbitEndPoint.DisplayCount}"
                             DisplayIcon="mail.ico"
                             DisplayText="{Binding RabbitEndPoint.DisplayText}"
                             ToolTip="{Binding RabbitEndPoint.ToolTip}" />

                <c:MetroTile Grid.Row="1"
                             Grid.Column="2"
                             Margin="10"
                             Background="{StaticResource MetroOrangeBrush}"
                             DisplayCount="{Binding ZeroMqEndPoint.DisplayCount}"
                             DisplayIcon="mail.ico"
                             DisplayText="{Binding ZeroMqEndPoint.DisplayText}"
                             ToolTip="{Binding ZeroMqEndPoint.ToolTip}" />

                <ScrollViewer Grid.Row="2"
                              Grid.Column="0"
                              Xaml:XamlHelper.AutoScroll="{Binding MsmqEndPoint.IsLogChanged}">
                    <TextBlock Margin="10"
                               Background="{StaticResource MetroGrayBrush}"
                               Padding="10"
                               Text="{Binding MsmqEndPoint.DisplayLog}"
                               TextWrapping="Wrap" />
                </ScrollViewer>
                <ScrollViewer Grid.Row="2"
                              Grid.Column="1"
                              Xaml:XamlHelper.AutoScroll="{Binding RabbitEndPoint.IsLogChanged}">
                    <TextBlock Margin="10"
                               Background="{StaticResource MetroGrayBrush}"
                               Padding="10"
                               Text="{Binding RabbitEndPoint.DisplayLog}"
                               TextWrapping="WrapWithOverflow" />
                </ScrollViewer>
                <ScrollViewer Grid.Row="2"
                              Grid.Column="2"
                              Xaml:XamlHelper.AutoScroll="{Binding ZeroMqEndPoint.IsLogChanged}">
                    <TextBlock Grid.Row="2"
                               Grid.Column="2"
                               Margin="10"
                               Background="{StaticResource MetroGrayBrush}"
                               Padding="10"
                               Text="{Binding ZeroMqEndPoint.DisplayLog}"
                               TextWrapping="WrapWithOverflow" />
                </ScrollViewer>
                <metro:ToggleSwitch Grid.Row="3"
                                    Grid.Column="0"
                                    Width="80"
                                    Height="50"
                                    Margin="10"
                                    HorizontalAlignment="Left"
                                    IsChecked="{Binding OverrideSwitch}"
                                    IsEnabled="True" />
                <Button Grid.Row="3"
                        Grid.Column="2"
                        Width="75"
                        Margin="10"
                        HorizontalAlignment="Right"
                        Command="{Binding CloseCommand}"
                        Content="Close" />
            </Grid>
        </TabItem>
    </TabControl>
</metro:Window>