source: trunk/CrypPlugins/WorkspaceManager/View/Container/PluginContainerView.xaml @ 1728

Last change on this file since 1728 was 1728, checked in by matkovic, 12 years ago

-added Animations
-added loupe image

File size: 11.5 KB
Line 
1<UserControl x:Class="WorkspaceManager.View.Container.PluginContainerView"
2             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6             xmlns:e="clr-namespace:WorkspaceManager.View.VisualComponents"
7             xmlns:z="clr-namespace:WorkspaceManager.View.Converter"
8             mc:Ignorable="d">
9    <UserControl.Resources>
10        <ResourceDictionary>
11            <ResourceDictionary.MergedDictionaries>
12                <ResourceDictionary Source="../Resource/Styles.xaml"/>
13                <ResourceDictionary Source="../Resource/Animations.xaml"/>
14            </ResourceDictionary.MergedDictionaries>
15            <z:ScaleToPercentageConverter x:Key="PercentageConverter"></z:ScaleToPercentageConverter>
16        </ResourceDictionary>
17    </UserControl.Resources>
18    <DockPanel Name="Root" LastChildFill="True">
19        <DockPanel x:Name="PluginBase" DockPanel.Dock="Left" VerticalAlignment="Top" MinHeight="90" MinWidth="90" Width="{Binding Path=Width,Mode=TwoWay}" Height="{Binding Path=Heigth,Mode=TwoWay}">
20            <DockPanel.Background>
21                <SolidColorBrush Opacity="0.01" Color="#444444"></SolidColorBrush>
22            </DockPanel.Background>
23            <StackPanel DockPanel.Dock="Right" Name="OutputConnectorPanel" />
24            <StackPanel DockPanel.Dock="Left" Name="InputConnectorPanel" />
25            <StackPanel DockPanel.Dock="Top" Name="ControlPanel" Visibility="Visible" Opacity="0" Orientation="Horizontal" HorizontalAlignment="Right">
26
27                <Button x:Name="ShowAllButton" Height="20" Width="20" Style="{StaticResource ResourceKey=DeletePluginContainerButtonStyle}" Margin="0,0,0,0" Click="ShowAllButton_Click">
28                    <Button.RenderTransform>
29                        <ScaleTransform ScaleX="0.8" ScaleY="0.8"></ScaleTransform>
30                    </Button.RenderTransform>
31                    <Image Source="/WorkspaceManager;component/View/Image/showall.png" HorizontalAlignment="Center" SnapsToDevicePixels="True" Margin="1,1,1,1"/>
32                </Button>
33
34                <Button Height="20" Width="20" Style="{StaticResource ResourceKey=SettingsPluginContainerButtonStyle}" Margin="0,0,0,0" Click="Button_Click_1">
35                    <Button.RenderTransform>
36                        <ScaleTransform ScaleX="0.8" ScaleY="0.8"></ScaleTransform>
37                    </Button.RenderTransform>
38                    <Image Source="/WorkspaceManager;component/View/Image/setting.png" HorizontalAlignment="Center" SnapsToDevicePixels="True" Margin="1,1,1,1"/>
39                </Button>
40       
41                <Button Height="20" Width="20" Style="{StaticResource ResourceKey=DeletePluginContainerButtonStyle}" Margin="0,0,0,5" Click="Button_Click">
42                    <Button.LayoutTransform>
43                        <ScaleTransform ScaleX="0.8" ScaleY="0.8"></ScaleTransform>
44                    </Button.LayoutTransform>
45                    <Image Source="/WorkspaceManager;component/View/Image/delete.png" HorizontalAlignment="Center" SnapsToDevicePixels="True" Margin="1,1,1,1"/>
46                </Button>
47            </StackPanel>
48       
49            <!--<Border DockPanel.Dock="Bottom" Height="10" Width="{Binding ElementName=PresentationPanel, Path=ActualWidth}" Background="#82bbef" BorderBrush="#4c71bf" BorderThickness="1" Opacity="0.5" Margin="0,0,0,0">
50                <StackPanel/>
51            </Border>-->
52
53            <Grid Name="MainGrid">
54                <Ellipse Fill="Black" Width="10" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top"></Ellipse>
55                <Grid Margin="3">
56                   
57                    <Canvas Width="auto" Height="auto">
58                        <Popup PlacementTarget="{Binding ElementName=MainGrid}" Placement="Left" x:Name="ProgressPopup" Width="45" Height="45" StaysOpen="True" IsOpen="True" AllowsTransparency="True">
59                           
60                        </Popup>
61                    </Canvas>
62                    <Border Name="Window" CornerRadius="5" BorderThickness="0" BorderBrush="Transparent" Margin="5">
63                        <Border.Background>
64                            <LinearGradientBrush Opacity="1" StartPoint="0,0" EndPoint="0,1">
65                                <GradientBrush.GradientStops>
66                                    <GradientStopCollection>
67                                        <GradientStop x:Name="BorderGradientStop" Color="#00b4fb" Offset="0.0"/>
68                                        <GradientStop x:Name="BorderGradientStopSecond" Color="#3300b4fb" Offset="1"/>
69                                    </GradientStopCollection>
70                                </GradientBrush.GradientStops>
71                            </LinearGradientBrush>
72                        </Border.Background>
73                        <Border.Effect>
74                            <DropShadowEffect BlurRadius="10" Direction="0" Color="Black" RenderingBias="Quality" ShadowDepth="0" ></DropShadowEffect>
75                        </Border.Effect>
76                        <Grid>
77         
78                            <Thumb Name="BottomDelta" IsEnabled="False" Opacity="0" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Cursor="SizeNS" DragDelta="Thumb_DragDelta"></Thumb>
79                            <Thumb Name="RightDelta" IsEnabled="False" Opacity="0" HorizontalAlignment="Right" VerticalAlignment="Stretch" Cursor="SizeWE" DragDelta="Thumb_DragDelta"></Thumb>
80                            <Thumb Name="BottomRightDelta" IsEnabled="False" Opacity="0" HorizontalAlignment="Right" VerticalAlignment="Bottom" Cursor="SizeNWSE" Height="15" Width="15" DragDelta="Thumb_DragDelta"></Thumb>
81                       
82                            <DockPanel Name="PresentationBase" Width="Auto" Height="Auto" LastChildFill="True" Margin="5,5,5,2">
83                                <!--<Grid Name="PluginNamePlate" DockPanel.Dock="Top" Margin="2.5,1.25,2.5,1.25" Height="17" Opacity="0.5" Background="#82bbef">
84                                    <Label Name="PluginName" FontSize="11" Margin="0,-3,0,0" FontFamily="Georgia" Foreground="WhiteSmoke" Content="test" HorizontalAlignment="left"></Label>
85                                </Grid>-->
86                                <Grid Name="MinMaxGrid" DockPanel.Dock="Bottom">
87                                    <Border BorderBrush="#88ffffff" Background="#33ffffff" BorderThickness="0.5" CornerRadius="2.5"/>
88                                    <Button Style="{StaticResource ResourceKey=MinMaxPluginContainerButtonStyle}" Margin="0,0,0,0" Click="MinMaxBorder_MouseLeftButtonDown">
89                                        <Button.LayoutTransform>
90                                            <ScaleTransform x:Name="MinMaxScale" ScaleX="0.92" ScaleY="0.92"></ScaleTransform>
91                                        </Button.LayoutTransform>
92                                        <Image SnapsToDevicePixels="True" x:Name="MinMaxImage" Source="/WorkspaceManager;component/View/Image/Max.png" HorizontalAlignment="Center" Height="10" Width="28" Margin="1,1,1,1"/>
93                                    </Button>
94                                </Grid>
95                                <Border Name="PresentationPanel" Width="Auto" Height="Auto"  Background="Transparent" Margin="0,0,0,2.5"></Border>
96                            </DockPanel>
97                        </Grid>
98                    </Border>
99                    <Popup x:Name="BubblePopup" PopupAnimation="Fade" HorizontalOffset="-21" VerticalOffset="8" PlacementTarget="{Binding ElementName=ShowAllButton}" Placement="Top" StaysOpen="False" AllowsTransparency="True" Width="65" Height="65">
100                        <Grid x:Name="BubbleGrid" Margin="2">
101                            <Grid.Effect>
102                                <DropShadowEffect Opacity="0.8"></DropShadowEffect>
103                            </Grid.Effect>
104                            <Grid.LayoutTransform>
105                                <ScaleTransform ScaleX="0.6" ScaleY="0.6"></ScaleTransform>
106                            </Grid.LayoutTransform>
107                            <Grid.RowDefinitions>
108                                <RowDefinition Height="*"/>
109                                <RowDefinition Height="40"/>
110                            </Grid.RowDefinitions>
111                            <Border Background="{StaticResource ResourceKey=BubblePopupLinearBrush}" BorderBrush="#f8f692" CornerRadius="10">
112                                <Grid Margin="6">
113                                    <ScrollViewer>
114                                        <TextBlock x:Name="Content" Foreground="#444444" FontSize="16"
115                                           Text="When the Placement  property is set to Custom, the Popup  calls a defined instance of the CustomPopupPlacementCallback  delegate. This delegate returns a set of possible points that are relative to the top left corner of the target area and the top left corner of the Popup. The Popup  placement occurs at the point that provides the best visibility." TextWrapping="Wrap"></TextBlock>
116                                    </ScrollViewer>
117                                </Grid>
118                            </Border>
119                            <Path Fill="#ffffec" Stretch="Fill" Stroke="#f8f692" HorizontalAlignment="Left" Margin="30,-1.35,0,0" Width="25" Grid.Row="1" Data="M18,154.45381 L29.999666,187.66699 40.791059,154.54395">
120                                <Path.RenderTransform>
121                                    <ScaleTransform ScaleY="0.5"></ScaleTransform>
122                                </Path.RenderTransform>
123                            </Path>
124                        </Grid>
125                    </Popup>
126                </Grid>
127            </Grid>
128        </DockPanel>
129        <Border Name="ShowAllData" Opacity="0" Panel.ZIndex="-1" Visibility="Visible" Width="125" Margin="-80,30,0,0" VerticalAlignment="Top" CornerRadius="{Binding ElementName=Window,Path=CornerRadius}" BorderBrush="{Binding ElementName=Window,Path=BorderBrush}" BorderThickness="{Binding ElementName=Window,Path=BorderThickness}">
130            <Border.RenderTransform>
131                <ScaleTransform ScaleX="0" ScaleY="0"></ScaleTransform>
132            </Border.RenderTransform>
133            <Border.Effect>
134                <DropShadowEffect BlurRadius="10" Direction="0" Color="Black" RenderingBias="Quality" ShadowDepth="0" ></DropShadowEffect>
135            </Border.Effect>
136            <Border.Background>
137                <LinearGradientBrush Opacity="0.5" StartPoint="0,0" EndPoint="0,1">
138                    <GradientBrush.GradientStops>
139                        <GradientStopCollection>
140                            <GradientStop Color="{Binding ElementName=BorderGradientStop, Path=Color}" Offset="0.0"/>
141                            <GradientStop Color="{Binding ElementName=BorderGradientStopSecond, Path=Color}" Offset="1"/>
142                        </GradientStopCollection>
143                    </GradientBrush.GradientStops>
144                </LinearGradientBrush>
145            </Border.Background>
146            <ScrollViewer VerticalScrollBarVisibility="Auto">
147                <StackPanel x:Name="DataPresentationPanel" Orientation="Vertical" Margin="5">
148               
149                </StackPanel>
150            </ScrollViewer>
151        </Border>
152    </DockPanel>
153</UserControl>
Note: See TracBrowser for help on using the repository browser.