2025-08-15 16:34:31 +08:00

144 lines
7.9 KiB
XML

<UserControl
x:Class="SWS.CAD.Views.RightPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SWS.CAD.Views"
xmlns:uc="clr-namespace:SWS.CAD.Views.CustomControl"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Width="280"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary Source="pack://application:,,,/SWS.CAD;component/Views/Style/CustomStyles.xaml" />
</UserControl.Resources>
<Grid IsEnabled="True">
<Grid.RowDefinitions>
<RowDefinition Height="25" />
<RowDefinition Height="25" />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Margin="2,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Background="Transparent"
Text="属性区" />
<!--<TextBox Grid.Row="1"
Margin="10,0,0,0" Width="200" Height="16" Visibility="{Binding PropertyVisibility}"
HorizontalAlignment="Left" Foreground="DeepPink"
VerticalAlignment="Center" BorderBrush="Black" BorderThickness="1"
Background="Transparent" IsReadOnly="True"
Text="{Binding objectTypeName}" />-->
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,5" >
<Button Margin="10,0,0,0" Command="{Binding Command_Qiehuan}" BorderBrush="{x:Null}" BorderThickness="0"
ToolTip="切换属性视图" Width="18" Height="18">
<Button.Background>
<ImageBrush ImageSource="{Binding qiehuanImage}" Stretch="Fill"/>
</Button.Background>
<Button.Style>
<Style TargetType="Button">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border BorderBrush="White" BorderThickness="1">
<Image Source="{Binding qiehuanImage}" Stretch="Fill"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Button Margin="10,0,0,0" Command="{Binding Command_History}" BorderBrush="{x:Null}" BorderThickness="0"
IsEnabled="{Binding isEnabledHistory}" ToolTip="查看属性修改历史" Width="20" Height="20">
<Button.Background>
<ImageBrush ImageSource="{Binding historyImage}" Stretch="Fill"/>
</Button.Background>
<Button.Style>
<Style TargetType="Button">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border BorderBrush="White" BorderThickness="1">
<Image Source="{Binding historyImage}" Stretch="Fill"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border BorderBrush="Black" BorderThickness="0">
<Image Source="{Binding history2Image}" Stretch="Fill"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Button Margin="10,0,0,0" Command="{Binding Command_Lock}" BorderBrush="{x:Null}" BorderThickness="0"
IsEnabled="{Binding isEnabledLock}" ToolTip="{Binding lockTooltip}" Width="20" Height="20">
<Button.Background>
<ImageBrush ImageSource="{Binding lockImage}" Stretch="Fill"/>
</Button.Background>
<Button.Style>
<Style TargetType="Button">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border BorderBrush="White" BorderThickness="1">
<Image Source="{Binding lockImage}" Stretch="Fill"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border BorderBrush="Black" BorderThickness="0">
<Image Source="{Binding lock2Image}" Stretch="Fill"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<telerik:RadComboBox
Width="160" Height="20" Margin="10,0,0,0"
DisplayMemberPath="objectDisplayName"
ItemsSource="{Binding listObjects,Mode=TwoWay}"
SelectedItem="{Binding SelectObject,Mode=TwoWay}"
Style="{StaticResource sysCombobox}" />
</StackPanel>
<ScrollViewer Grid.Row="2" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<Grid x:Name="gridBasic" IsEnabled="{Binding isEnabledGridProterty}">
<Grid >
<uc:PropertyGrid ShowProp="{Binding listShowProperty,Mode=TwoWay}" Background="Transparent"
IsBasicGroup="{Binding isBasicGroup,Mode=TwoWay}" CurrentPropertyName="{Binding CurrentPropertyName,Mode=TwoWay}" HorizontalAlignment="Left" Height="auto" Margin="1" VerticalAlignment="Top" Width="270"/>
</Grid>
</Grid>
</ScrollViewer>
</Grid>
</UserControl>