Files
Artemis/src/Artemis.UI/Views/Controls/Editor/SurfaceEditorView.xaml
T
SpoinkyNL 6e23c079b1 Started layout editor implementation
Rearranged VMs/Views
Updated RGB.NET
2019-08-11 01:23:13 +02:00

33 lines
1.6 KiB
XML

<UserControl x:Class="Artemis.UI.Views.Controls.Editor.SurfaceEditorView"
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:editor="clr-namespace:Artemis.UI.ViewModels.Controls.Editor"
xmlns:xaml="https://github.com/canton7/Stylet"
mc:Ignorable="d"
d:DesignHeight="450"
d:DesignWidth="800"
d:DataContext="{d:DesignInstance editor:SurfaceEditorViewModel}">
<Grid>
<TextBlock>Surface editor view</TextBlock>
<ItemsControl ItemsSource="{Binding Devices}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Canvas />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemContainerStyle>
<Style TargetType="ContentPresenter">
<Setter Property="Canvas.Left" Value="{Binding Device.Location.X}" />
<Setter Property="Canvas.Top" Value="{Binding Device.Location.Y}" />
</Style>
</ItemsControl.ItemContainerStyle>
<ItemsControl.ItemTemplate>
<DataTemplate>
<ContentControl Width="{Binding Device.Size.Width}" Height="{Binding Device.Size.Height}" xaml:View.Model="{Binding }"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</UserControl>