diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-05 17:13:36 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-05 17:13:36 +0200 |
| commit | e66f1bad3aad6de7f63aa9c277b87d8416c08488 (patch) | |
| tree | 0fa147e0ffb968d7d3588e2cffddb81132f14456 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml | |
| parent | 7228d8ffc60ee07fdc3532f9a6c06719a7f352a8 (diff) | |
| download | Tango-e66f1bad3aad6de7f63aa9c277b87d8416c08488.tar.gz Tango-e66f1bad3aad6de7f63aa9c277b87d8416c08488.zip | |
Implemented HiveColorPicker mock on developer module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index 4be818a3e..ae57c2d25 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -26,7 +26,7 @@ <UserControl.InputBindings> <KeyBinding Key="Esc" Command="{Binding ExitFullScreenCommand}"></KeyBinding> </UserControl.InputBindings> - + <UserControl.Resources> <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}"> <Setter Property="mahapps:ControlsHelper.HeaderFontSize" Value="14" /> @@ -159,9 +159,40 @@ <Setter Property="Template"> <Setter.Value> <ControlTemplate> - <colorPicker:ColorPickerCombo SelectedColorChanged="ColorPickerCombo_SelectedColorChanged" SelectedColor="{Binding Color,Mode=TwoWay}" Margin="30 0 0 0" VerticalAlignment="Center" Width="100" BorderBrush="{StaticResource AccentColorBrush}" Background="White"> + <Grid> + <ToggleButton Cursor="Hand" x:Name="PopupButton" BorderThickness="0" Height="30" Background="Transparent" Foreground="{StaticResource AccentColorBrush}" VerticalAlignment="Center" Margin="30 0 0 0" IsChecked="{Binding ElementName=Popup, Path=IsOpen}"> + <ToggleButton.Style> + <Style TargetType="ToggleButton" BasedOn="{StaticResource emptyToggleButton}"> + <Style.Triggers> + <DataTrigger Binding="{Binding IsOpen, ElementName=Popup}" Value="True"> + <Setter Property="IsEnabled" Value="False" /> + </DataTrigger> + </Style.Triggers> + </Style> + </ToggleButton.Style> - </colorPicker:ColorPickerCombo> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon VerticalAlignment="Center" Kind="Pencil" Width="24" Height="24"> + <materialDesign:PackIcon.Foreground> + <SolidColorBrush Color="{Binding Color}"></SolidColorBrush> + </materialDesign:PackIcon.Foreground> + </materialDesign:PackIcon> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">SELECT COLOR</TextBlock> + </StackPanel> + </ToggleButton> + <Popup x:Name="Popup" MouseDown="Popup_MouseDown" PopupAnimation="Fade" StaysOpen="False" PlacementTarget="{Binding ElementName=PopupButton}" Placement="Bottom" AllowsTransparency="True"> + <Border Background="#E6FFFFFF" Height="250" Width="500" CornerRadius="5" Margin="10"> + <Border.Effect> + <DropShadowEffect ShadowDepth="0" BlurRadius="10" /> + </Border.Effect> + <Grid> + <Grid Margin="10"> + <commonControls:HiveColorPickerControl SelectedColorChanged="HiveColorPickerControl_SelectedColorChanged" SelectedColor="{Binding Color,Mode=TwoWay}" DemoMode="True" /> + </Grid> + </Grid> + </Border> + </Popup> + </Grid> </ControlTemplate> </Setter.Value> </Setter> @@ -734,7 +765,7 @@ <Rectangle VerticalAlignment="Bottom" Stroke="#CECECE" StrokeThickness="1"></Rectangle> </Grid> - + <!--Main Grid--> <Grid Grid.Row="1"> <Grid> |
