using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using Tango.SharedUI; namespace Tango.Scripting.IDE.Notifications { /// /// Represents the IDE notification manager. /// public interface INotificationManager { /// /// Displays the specified TView as a dialog and TViewModel as it's data context. /// /// The type of the view model. /// The type of the view. /// The view model. /// The view. /// Task ShowDialog(TViewModel viewModel, TView view) where TViewModel : IDEDialogViewModel where TView : FrameworkElement; /// /// Finds (by convention )the appropriate view by the specified TViewModel name. /// The search pattern is ViewVM - VM + View. /// /// The type of the view model. /// The view model. /// Task ShowDialog(TViewModel viewModel) where TViewModel : IDEDialogViewModel; /// /// Finds (by convention )the appropriate view by the specified TViewModel name. /// The search pattern is ViewVM - VM + View. /// The view model instance will be created automatically and must contain a parameterless constructor. /// /// The type of the view model. /// The view model. /// Task ShowDialog() where TViewModel : IDEDialogViewModel; /// /// Displays an error message. /// /// The title. /// The message. /// Task ShowError(String title, String message); /// /// Displays an error message. /// /// The title. /// The message. /// Task ShowInfo(String title, String message); /// /// Displays a warning message. /// /// The title. /// The message. /// Task ShowWarning(String title, String message); /// /// Displays a positive message. /// /// The title. /// The message. /// Task ShowSuccess(String title, String message); /// /// Displays a question and returns the result. /// /// The title. /// The message. /// Task ShowQuestion(String title, String message); /// /// Displays an intermediate progress dialog and returns an instance of . /// Once the progress notification handler will be disposed the dialog will close. /// /// The title. /// The message. /// if set to true the dialog will contain a cancel button. /// ProgressNotificationHandler ShowProgress(String title, String message, bool canCancel = false); } }
<UserControl x:Class="Tango.MachineStudio.MachineDesigner.Views.MainView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Tango.MachineStudio.MachineDesigner.Views"
             xmlns:global="clr-namespace:Tango.MachineStudio.MachineDesigner"
             xmlns:vm="clr-namespace:Tango.MachineStudio.MachineDesigner.ViewModels"
             xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             mc:Ignorable="d" 
             d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
    <Grid>
        <controls:NavigationControl x:Name="navigationControl" TransitionType="Slide">
            <local:MachinesView />
            <local:MachineDetailsView/>
        </controls:NavigationControl>
    </Grid>
</UserControl>