Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gray Color on The Page Design Palate | Simphony

Status
Not open for further replies.

9Coder

IS-IT--Management
Apr 16, 2019
53
ID
Hi everyone,

o you guys know how to get that Gray color on that palette? Normally the theme that quite similar to this was Theme Harmony in Theme Assignment. But the color was black. Does anyone know how to get these nice gray colors? If it was customized, do you guys have an XML file for this type of color?

Capture_ocvqm3.png
 
Yes you need XAML custom style for this.

I had a little fun with the colour but you can mess around with the colour gradients to get something you like.

image_cx6rjw.png


Add this XAML in as a contenttype as Loose Xaml in the EMC.

The sections you need to modify are the LinearGradientBrush GradientStop values.
You can add more GradientStop values if you want.
The Color takes either a color name or a hex colour value like #AB908A.
You can generate a hex colour code here
<LinearGradientBrush.GradientStops>
<GradientStop Color="Yellow" Offset="0.0" />
<GradientStop Color="Orange" Offset="0.5" />
<GradientStop Color="Red" Offset="1.0" />
</LinearGradientBrush.GradientStops>

Code:
<ResourceDictionary
    xmlns="[URL unfurl="true"]http://schemas.microsoft.com/winfx/2006/xaml/presentation"[/URL]
    xmlns:x="[URL unfurl="true"]http://schemas.microsoft.com/winfx/2006/xaml"[/URL]
    xmlns:mroot="clr-namespace:Micros.OpsUI;assembly=OpsUI"
    xmlns:mcontrol="clr-namespace:Micros.OpsUI.Controls;assembly=OpsUI"
    xmlns:mconverters="clr-namespace:Micros.OpsUI.Converters;assembly=OpsUI"
    xmlns:vsm="clr-namespace:System.Windows;assembly=wpftoolkit"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
    xmlns:mwt="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
    >
    <Style TargetType="RadioButton" x:Key="Micros.Theme.NavigationBar.ItemStyle">
        <Style.Resources>
            <system:String x:Key="Category">Internal</system:String>
        </Style.Resources>
        <Setter Property="MinHeight" Value="70"/>
        <Setter Property="ClickMode" Value="Press"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="Margin" Value="0,0,-1,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                   <Border Name="mainBorder" BorderThickness="1" BorderBrush="White">
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CheckStates">
                                <vsm:VisualState x:Name="Indeterminate" />
                                <vsm:VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="mainBorder">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                  <LinearGradientBrush  StartPoint="0,0" EndPoint="0,1">
                                                    <LinearGradientBrush.GradientStops>
                                                      <GradientStop Color="Yellow" Offset="0.0" />
                                                      <GradientStop Color="Orange" Offset="0.5" />
                                                      <GradientStop Color="Red" Offset="1.0" />
                                                    </LinearGradientBrush.GradientStops>
                                                  </LinearGradientBrush>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="triangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Unchecked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="mainBorder">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                  <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                    <LinearGradientBrush.GradientStops>
                                                      <GradientStop Color="Yellow" Offset="0.0" />
                                                      <GradientStop Color="Orange" Offset="0.5" />
                                                      <GradientStop Color="Red" Offset="1.0" />
                                                    </LinearGradientBrush.GradientStops>
                                                  </LinearGradientBrush>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="triangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>
                        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <ContentPresenter Grid.Row="1" Name="contentPresenter"
                                              VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
                            <Polygon Name="triangle" Points="0,1 1,1 .5,0" Fill="{DynamicResource Micros.Theme.NavigationBarItem.IndicatorColor}"
                                         Width="30" Height="12" Stretch="Fill" Margin="0,0,0,0"
                                         VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>

Specialist in creating custom applications for the Micros POS range: 3700, 9700, Simphony FE, Simphony. SIM Scripts, Data Exports, Simphony extension applications, API Creation and integration. If you need anything please contact me via my website
 
@CathalMF that's great, 2 things that are left were the tab control & status bar color.

I tried to add another style tag and filled it with resources, but it doesn't take effect at all. Is the below tag is correct?
May I know how do you get the style tag for the navigation bar?

Code:
<Style TargetType="RadioButton" x:Key="Micros.Theme.TabControl.ItemStyle">
	
	</Style>
	<Style TargetType="RadioButton" x:Key="Micros.Theme.StatusBar.ItemStyle">
	</Style>
 
@CathalMF below is the full code that I've modified from yours, still the tab & status bar aren't affected at all.

Code:
<ResourceDictionary
    xmlns="[URL unfurl="true"]http://schemas.microsoft.com/winfx/2006/xaml/presentation"[/URL]
    xmlns:x="[URL unfurl="true"]http://schemas.microsoft.com/winfx/2006/xaml"[/URL]
    xmlns:mroot="clr-namespace:Micros.OpsUI;assembly=OpsUI"
    xmlns:mcontrol="clr-namespace:Micros.OpsUI.Controls;assembly=OpsUI"
    xmlns:mconverters="clr-namespace:Micros.OpsUI.Converters;assembly=OpsUI"
    xmlns:vsm="clr-namespace:System.Windows;assembly=wpftoolkit"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
    xmlns:mwt="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
    >
    <Style TargetType="RadioButton" x:Key="Micros.Theme.NavigationBar.ItemStyle">

        <Style.Resources>
            <system:String x:Key="Category">Internal</system:String>
        </Style.Resources>
        <Setter Property="MinHeight" Value="70"/>
        <Setter Property="ClickMode" Value="Press"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="Margin" Value="0,0,-1,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                   <Border Name="mainBorder" BorderThickness="1" BorderBrush="White">
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CheckStates">
                                <vsm:VisualState x:Name="Indeterminate" />
                                <vsm:VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="mainBorder">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                  <LinearGradientBrush  StartPoint="0,0" EndPoint="0,1">
                                                    <LinearGradientBrush.GradientStops>
                                                      <GradientStop Color="Yellow" Offset="0.0" />
                                                      <GradientStop Color="Orange" Offset="0.5" />
                                                      <GradientStop Color="Red" Offset="1.0" />
                                                    </LinearGradientBrush.GradientStops>
                                                  </LinearGradientBrush>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="triangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Unchecked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="mainBorder">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                  <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                    <LinearGradientBrush.GradientStops>
                                                      <GradientStop Color="Yellow" Offset="0.0" />
                                                      <GradientStop Color="Orange" Offset="0.5" />
                                                      <GradientStop Color="Red" Offset="1.0" />
                                                    </LinearGradientBrush.GradientStops>
                                                  </LinearGradientBrush>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="triangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>
                        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <ContentPresenter Grid.Row="1" Name="contentPresenter"
                                              VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
                            <Polygon Name="triangle" Points="0,1 1,1 .5,0" Fill="{DynamicResource Micros.Theme.NavigationBarItem.IndicatorColor}"
                                         Width="30" Height="12" Stretch="Fill" Margin="0,0,0,0"
                                         VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
	
	<Style TargetType="RadioButton" x:Key="Micros.Theme.TabControl.ItemStyle">
	     <Style.Resources>
            <system:String x:Key="Category">Internal</system:String>
        </Style.Resources>
        <Setter Property="MinHeight" Value="70"/>
        <Setter Property="ClickMode" Value="Press"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="Margin" Value="0,0,-1,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                   <Border Name="mainBorder" BorderThickness="1" BorderBrush="White">
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CheckStates">
                                <vsm:VisualState x:Name="Indeterminate" />
                                <vsm:VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="mainBorder">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                  <LinearGradientBrush  StartPoint="0,0" EndPoint="0,1">
                                                    <LinearGradientBrush.GradientStops>
                                                      <GradientStop Color="Yellow" Offset="0.0" />
                                                      <GradientStop Color="Orange" Offset="0.5" />
                                                      <GradientStop Color="Red" Offset="1.0" />
                                                    </LinearGradientBrush.GradientStops>
                                                  </LinearGradientBrush>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="triangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Unchecked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="mainBorder">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                  <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                    <LinearGradientBrush.GradientStops>
                                                      <GradientStop Color="Yellow" Offset="0.0" />
                                                      <GradientStop Color="Orange" Offset="0.5" />
                                                      <GradientStop Color="Red" Offset="1.0" />
                                                    </LinearGradientBrush.GradientStops>
                                                  </LinearGradientBrush>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="triangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>
                        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <ContentPresenter Grid.Row="1" Name="contentPresenter"
                                              VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
                            <Polygon Name="triangle" Points="0,1 1,1 .5,0" Fill="{DynamicResource Micros.Theme.NavigationBarItem.IndicatorColor}"
                                         Width="30" Height="12" Stretch="Fill" Margin="0,0,0,0"
                                         VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
	</Style>
	<Style TargetType="RadioButton" x:Key="Micros.Theme.StatusBar.ItemStyle">
	     <Style.Resources>
            <system:String x:Key="Category">Internal</system:String>
        </Style.Resources>
        <Setter Property="MinHeight" Value="70"/>
        <Setter Property="ClickMode" Value="Press"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="Margin" Value="0,0,-1,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                   <Border Name="mainBorder" BorderThickness="1" BorderBrush="White">
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CheckStates">
                                <vsm:VisualState x:Name="Indeterminate" />
                                <vsm:VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="mainBorder">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                  <LinearGradientBrush  StartPoint="0,0" EndPoint="0,1">
                                                    <LinearGradientBrush.GradientStops>
                                                      <GradientStop Color="Yellow" Offset="0.0" />
                                                      <GradientStop Color="Orange" Offset="0.5" />
                                                      <GradientStop Color="Red" Offset="1.0" />
                                                    </LinearGradientBrush.GradientStops>
                                                  </LinearGradientBrush>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="triangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Unchecked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="mainBorder">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                  <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                    <LinearGradientBrush.GradientStops>
                                                      <GradientStop Color="Yellow" Offset="0.0" />
                                                      <GradientStop Color="Orange" Offset="0.5" />
                                                      <GradientStop Color="Red" Offset="1.0" />
                                                    </LinearGradientBrush.GradientStops>
                                                  </LinearGradientBrush>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="triangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>
                        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <ContentPresenter Grid.Row="1" Name="contentPresenter"
                                              VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
                            <Polygon Name="triangle" Points="0,1 1,1 .5,0" Fill="{DynamicResource Micros.Theme.NavigationBarItem.IndicatorColor}"
                                         Width="30" Height="12" Stretch="Fill" Margin="0,0,0,0"
                                         VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
	</Style>
</ResourceDictionary>
 
Why have you added 3 styles?
You should only have one. The key value needs to be unique and set to x:Key="Micros.Theme.NavigationBar.ItemStyle".

Since you have 3 its probably breaking.

Specialist in creating custom applications for the Micros POS range: 3700, 9700, Simphony FE, Simphony. SIM Scripts, Data Exports, Simphony extension applications, API Creation and integration. If you need anything please contact me via my website
 
I found out the style information by decompiling the Simphony code.

Specialist in creating custom applications for the Micros POS range: 3700, 9700, Simphony FE, Simphony. SIM Scripts, Data Exports, Simphony extension applications, API Creation and integration. If you need anything please contact me via my website
 
You also need to do a db reload on the workstations and restart them to get it to show.
However you an preview it in the Page Designer. But you will have to close and reopen the page designer tab.

Specialist in creating custom applications for the Micros POS range: 3700, 9700, Simphony FE, Simphony. SIM Scripts, Data Exports, Simphony extension applications, API Creation and integration. If you need anything please contact me via my website
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top