mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
33 lines
1.6 KiB
XML
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> |