rainmeter-studio/RainmeterStudio/Editor/SkinDesigner/SkinDesignerUI.xaml

96 lines
4.1 KiB
XML

<UserControl x:Class="RainmeterStudio.Editor.SkinDesigner.SkinDesignerUI"
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:s="clr-namespace:System;assembly=mscorlib"
xmlns:sd="clr-namespace:RainmeterStudio.Editor.SkinDesigner"
xmlns:sdcontrols="clr-namespace:RainmeterStudio.Editor.SkinDesigner.Controls"
xmlns:b="clr-namespace:RainmeterStudio.Business"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="600">
<UserControl.Resources>
<Style x:Key="MeasuresListViewStyle" TargetType="ListView">
<Style.Triggers>
<Trigger Property="HasItems" Value="False">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListView">
<Grid>
<TextBlock TextAlignment="Center"
HorizontalAlignment="Center"
VerticalAlignment="Center"
TextWrapping="Wrap"
Text="There are no measures in this skin. You can drag measures from the toolbox." />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<b:ImageResourceConverter x:Key="ResourceConverter" />
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<!-- TODO: zoom -->
<ScrollViewer Grid.Column="0"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto" >
<ScrollViewer.Background>
<ImageBrush ImageSource="/Resources/Graphics/transparent_background.png"
Stretch="None" TileMode="Tile"
AlignmentX="Center" AlignmentY="Center"
Viewport="0,0,16,16"
ViewportUnits="Absolute" />
</ScrollViewer.Background>
<sdcontrols:MeterControl x:Name="meterControl" />
</ScrollViewer>
<GridSplitter Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="LightGray"/>
<Border Grid.Column="1" Background="#eee"
HorizontalAlignment="Center"
VerticalAlignment="Top"
Padding="0,10,0,10"
CornerRadius="0,0,20,0">
<TextBlock Text="Meters">
<TextBlock.LayoutTransform>
<RotateTransform Angle="90" />
</TextBlock.LayoutTransform>
</TextBlock>
</Border>
<Border Grid.Column="1" Background="#eee"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
Padding="0,10,0,10"
CornerRadius="20,0,0,0">
<TextBlock Text="Measures">
<TextBlock.LayoutTransform>
<RotateTransform Angle="-90" />
</TextBlock.LayoutTransform>
</TextBlock>
</Border>
<ListView Name="listMeasures" Grid.Column="2"
Style="{StaticResource MeasuresListViewStyle}">
</ListView>
</Grid>
</UserControl>