mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
79 lines
3.3 KiB
XML
79 lines
3.3 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:viewmodel="clr-namespace:AIStudio.Wpf.DiagramDesigner.Additionals.Extensions.ViewModels"
|
|
xmlns:gif="http://wpfanimatedgif.codeplex.com"
|
|
xmlns:converter="clr-namespace:AIStudio.Wpf.DiagramDesigner.Additionals.Converters"
|
|
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Additionals.Controls"
|
|
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
|
xmlns:Fluent="urn:fluent-ribbon"
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors">
|
|
|
|
<dd:BoolVisibilityConverter x:Key="BoolVisibilityConverter"/>
|
|
<converter:DoubleToThickness x:Key="DoubleToThickness"/>
|
|
<dd:ColorBrushConverter x:Key="ColorBrushConverter"/>
|
|
|
|
<ControlTemplate x:Key="infoButtonTemplate" TargetType="Button">
|
|
<Grid x:Name="grid" Opacity="0.1">
|
|
<Ellipse Width="16"
|
|
Height="16"
|
|
Stroke="Black"
|
|
StrokeThickness="2"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Fill="White"/>
|
|
<Label Content="i"
|
|
FontWeight="Bold"
|
|
FontStyle="Italic"
|
|
HorizontalAlignment="Center"
|
|
HorizontalContentAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
FontSize="12" />
|
|
</Grid>
|
|
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver"
|
|
Value="True">
|
|
<Setter TargetName="grid"
|
|
Property="Opacity"
|
|
Value="1.0" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
|
|
</ControlTemplate>
|
|
|
|
<!-- DataTemplate for DesignerCanvas look and feel -->
|
|
<DataTemplate DataType="{x:Type viewmodel:SettingsDesignerItemViewModel}">
|
|
<Grid>
|
|
<Image IsHitTestVisible="False"
|
|
Stretch="Fill"
|
|
Source="/AIStudio.Wpf.DiagramApp;component/Images/Setting.png"
|
|
Tag="setting" />
|
|
<Button HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Margin="5"
|
|
Template="{StaticResource infoButtonTemplate}"
|
|
Command="{Binding EditCommand}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<!-- DataTemplate for Popup look and feel -->
|
|
<DataTemplate DataType="{x:Type viewmodel:SettingsDesignerItemData}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Label Grid.Row="0"
|
|
Content="Setting1"
|
|
Margin="5" />
|
|
<TextBox Grid.Row="1"
|
|
HorizontalAlignment="Left"
|
|
Text="{Binding Setting}"
|
|
Width="150"
|
|
Margin="5" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
</ResourceDictionary> |