aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/MainWindow.xaml
blob: 0bedbb1fb875f396be7297e888e10f818e46a08d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<mahapps:MetroWindow x:Class="Tango.MachineEM.UI.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
        xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
        xmlns:fa="http://schemas.fontawesome.io/icons/"
        xmlns:local="clr-namespace:Tango.MachineEM.UI"
        xmlns:views="clr-namespace:Tango.MachineEM.UI.Views"
        mc:Ignorable="d"
        Title="Tango Embedded Emulator" Height="720" Width="1200" TitleCaps="False" BorderBrush="Gray" BorderThickness="1" WindowStartupLocation="CenterScreen" Background="#202020" Foreground="Gainsboro" DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <Grid>
        <views:MainView DataContext="{StaticResource MainViewVM}"></views:MainView>
    </Grid>
</mahapps:MetroWindow>
class="k">using System.Threading.Tasks; using System.Windows.Threading; using Tango.PPC.Common.Threading; namespace Tango.PPC.UI.Threading { /// <summary> /// Represents the default PPC <see cref="IDispatcherProvider"/> which will invoke action on the current application dispatcher. /// </summary> /// <seealso cref="Tango.PPC.Common.Threading.IDispatcherProvider" /> public class DefaultDispatcherProvider : IDispatcherProvider { private Dispatcher _dispatcher; /// <summary> /// Initializes a new instance of the <see cref="DefaultDispatcherProvider"/> class. /// </summary> /// <param name="dispatcher">The dispatcher.</param> public DefaultDispatcherProvider(Dispatcher dispatcher) { _dispatcher = dispatcher; } /// <summary> /// Invokes the specified action asynchronously. /// </summary> /// <param name="action">The action.</param> public void Invoke(Action action) { _dispatcher.BeginInvoke(action); } /// <summary> /// Invokes the specified action synchronously. /// </summary> /// <param name="action">The action.</param> public void InvokeBlock(Action action) { _dispatcher.Invoke(action); } } }