1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Surface editor RGB.NET update WIP

This commit is contained in:
Robert 2019-11-21 19:32:43 +01:00
parent 240efb2907
commit 9f0d5fd7e0
3 changed files with 9 additions and 7 deletions

View File

@ -110,12 +110,9 @@
</ItemsControl.ItemContainerStyle>
<ItemsControl.ItemTemplate>
<DataTemplate>
<ContentControl Width="{Binding Device.RgbDevice.Size.Width}"
Height="{Binding Device.RgbDevice.Size.Height}"
<ContentControl Width="{Binding Device.RgbDevice.DeviceRectangle.Size.Width}"
Height="{Binding Device.RgbDevice.DeviceRectangle.Size.Height}"
s:View.Model="{Binding}">
<ContentControl.RenderTransform>
<RotateTransform Angle="{Binding Device.RgbDevice.Rotation.Degrees}" CenterX="{Binding RgbDeviceRectangle.Center.X}" CenterY="{Binding RgbDeviceRectangle.Center.Y}"></RotateTransform>
</ContentControl.RenderTransform>
<ContentControl.ContextMenu>
<ContextMenu>
<MenuItem Header="Bring to Front" Command="{s:Action BringToFront}" CommandParameter="{Binding}">

View File

@ -19,6 +19,9 @@
<converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
</UserControl.Resources>
<Grid>
<Grid.LayoutTransform>
<RotateTransform Angle="{Binding Device.RgbDevice.Rotation.Degrees}"></RotateTransform>
</Grid.LayoutTransform>
<!-- Device image with fallback -->
<Image Source="{Binding Device.RgbDevice.DeviceInfo.Image, Converter={StaticResource NullToImageConverter}}" />

View File

@ -32,8 +32,10 @@ namespace Artemis.UI.Screens.SurfaceEditor.Visualization
private void DeviceOnDeviceUpdated(object sender, EventArgs e)
{
NotifyOfPropertyChange(() => RgbDeviceRectangle);
NotifyOfPropertyChange(() => Device.RgbDevice);
NotifyOfPropertyChange(() => RgbDeviceRectangle);
NotifyOfPropertyChange(() => RgbDeviceRectangle.Location.X);
NotifyOfPropertyChange(() => RgbDeviceRectangle.Location.Y);
}
public Device Device { get; set; }