Add support for WPF controls in plugins and method parameters in plugin commands

This commit is contained in:
John Gross
2017-04-04 16:22:13 -07:00
parent 8bf7cd2c1a
commit 2858c35c38
32 changed files with 472 additions and 19 deletions

View File

@@ -0,0 +1,27 @@
<UserControl x:Class="Torch.Server.Views.PluginsControl"
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:Torch.Server.Views"
xmlns:viewModels="clr-namespace:Torch.Server.ViewModels"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.DataContext>
<viewModels:PluginManagerViewModel/>
</UserControl.DataContext>
<DockPanel>
<ListView Width="150" ItemsSource="{Binding Plugins}" SelectedItem="{Binding SelectedPlugin}" Margin="3">
<ListView.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<StackPanel Margin="3">
<Label Content="{Binding SelectedPlugin.Name}" FontSize="16"/>
<Frame Content="{Binding SelectedPlugin.Control}"/>
</StackPanel>
</DockPanel>
</UserControl>