Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //WPF Part
- <Window x:Class="i4pro_gruppe_d.View.HomingRobot"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- Title="" Height="150" Width="350" ResizeMode="NoResize" ShowInTaskbar="False">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="20"/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition Width="20"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="45"/>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Label Grid.Column="1" Grid.ColumnSpan="3" FontSize="25" Content="Homing Robot" HorizontalAlignment="Center"/>
- <ProgressBar Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="1" IsIndeterminate="True" />
- <Label Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="2" Content="This can take a few minuts.." HorizontalAlignment="Center" />
- </Grid>
- </Window>
- #Code behind
- using System.Windows;
- using GalaSoft.MvvmLight.Messaging;
- namespace i4pro_gruppe_d.View
- {
- public partial class HomingRobot : Window
- {
- private Messenger messengerInstance;
- public HomingRobot()
- {
- InitializeComponent();
- messengerInstance = Messenger.Default;
- messengerInstance.Register<bool>(this, "HomingDone", CloseWindow);
- }
- private void CloseWindow(bool b)
- {
- this.Close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement