vHUD for Project Cars - Documentation - Controls

These are custom controls that can be used to display information on your Displays.

You can use most of the standard XAML controls, but the ones listead here are custom made for this App.

Label Value VerticalBar HorizontalBar Icon OnOff TriStateShape Image

Notes

Colour HEX codes can be on the format #000000 or #FF000000 (first two control the opacity).

Common options:

Margin Possible values: X,X,X,X. Each X is a number, and the order is LEFT, TOP, RIGHT, BOTTOM

HorizontalAlignment Possible values: Left or Right or Center

VerticalAlignment Possible values: Top or Bottom or Center

Label

Show text on the Display.

TextColor Possible values: HEX code or Application Color

TextAlignment Possible values: Left or Right

ElementAlignment Possible values: Left or Right

Text Possible values: Any fixed text

TextVariable Possible values: Application Variable. Should only use variables that return a string. If used the value of Text is ignored.

TextSize Possible values: Any number

FontFamily Possible values: Font name

<local:Label Margin="10,10,10,10" TextColor="LabelColor" TextSize="20" Text="lap time" />
<local:Label Margin="10,10,10,10" HorizontalAlignment="Left" VerticalAlignment="Top"
   TextColor="LabelColor" TextSize="20" TextVariable="SessionName" FontFamily="Arial" />

Back to top

Value

Show a value on the Display. Can have a shadow text with a specified opacity, and can have different controls based on the current value.

ValueAboveColor Possible values: HEX code or Application Color

ValueBelowColor Possible values: HEX code or Application Color. This colour is used when NumericVariable is equal or lower than ValueTreshold. If no ValueAboveColor is specified, then this colour is always used.

MaskOpacity Possible values: 0.0 to 1.0

TextAlignment Possible values: Left or Right

ElementAlignment Possible values: Left or Right

TextLength Only used when NumericVariable is specified.. Possible values: 0 to X. If a value greater than 0 is specified, then the value displayed will have extra 0 added to the left side until TextLength is reached. For example, if NumericVariable is 10 and TextLength is 3, then the value displayed is 010.

NumericVariable Possible values: Application Variable. Should only use variables that return a number. Should not be used in conjunction to TextVariable

TextVariable Possible values: Application Variable. Should only use variables that return a string. Should not be used in conjunction to NumericVariable

TextSize Possible values: Any number

MaskText Possible values: Any text. The text will be displayed on the background of the value with the opacity specified by MaskOpacity. Useful when displaying numbers.

ValueTreshold Possible values: Any number. If specified, when the NumericVariable is above this value, the text color is changed to ValueAboveColor.

ValueTresholdVariable Possible values: Application Variable. Should only use variables that return a number. If specified it will override the value of ValueTreshold.

FontFamily Possible values: Font name

TextFormat Possible values: 0.xx. This is only used when the value supplied is a number. Use the scheme "0.00", where the number of 0s after the decimal point indicate how many decimal places you want to show. Use just "0" to round to the nearest integer value.

UpdateTextFromValueVariable Possible values: true / false. Defaut is true. If false, the Text property will not be updated with the TextVariable or NumericVariable value.

<local:Value ValueBelowColor="TimeLostColor" ValueAboveColor="ValueColor" TextSize="30"
   MaskOpacity="0.1" MaskText="88"
   NumericVariable="FuelLapsLeft" ValueTreshold="2" TextLength="2" FontFamily="Arial" />

Back to top

VerticalBar

Show a vertical bar that grows based on the value. The value should be between 0 and 100, therefore Application Variables that return a percentage.
When MinValue and MaxValue are specified (or the alternatives MinValueVariable and MaxValueVariable), a conversion is made from the number read. For example, if the MinValue and MaxValue are 0 to 30, when the value read is 30, the bar will be at full width.

BarColor Possible values: HEX code or Application Color

ValueVariable Possible values: Application Variable. Should only use variables that return a percentage.

BackgroundOpacity Possible values: Any number from 0.0 to 1.0

MinValue Possible values: Any number

MaxValue Possible values: Any number

MinValueVariable Possible values: Application Variable. Should only use variables that return a number.

MaxValueVariable Possible values: Application Variable. Should only use variables that return a number.

Animate Possible values: True / False. The user settings for animations can override this value.

StartPoint Possible values: Coordinates. Default is "1,1" for bottom side. Use "0,0" for the top side.

Width Possible values: Any number

Height Possible values: Any number

<local:VerticalBar VerticalAlignment="Top" HorizontalAlignment="Left"
   BarColor="#63bd99" ValueVariable="ClutchPedalPercentage" Width="40" Height="50" />

Back to top

HorizontalBar

Show an horizontal bar that grows based on the value. The value should be between 0 and 100, therefore Application Variables that return a percentage.
When MinValue and MaxValue are specified (or the alternatives MinValueVariable and MaxValueVariable), a conversion is made from the number read. For example, if the MinValue and MaxValue are 0 to 30, when the value read is 30, the bar will be at full width.

BarColor Possible values: HEX code or Application Color

ValueVariable Possible values: Application Variable. Should only use variables that return a percentage.

BackgroundOpacity Possible values: Any number from 0.0 to 1.0

MinValue Possible values: Any number

MaxValue Possible values: Any number

MinValueVariable Possible values: Application Variable. Should only use variables that return a number.

MaxValueVariable Possible values: Application Variable. Should only use variables that return a number.

Animate Possible values: True / False. The user settings for animations can override this value.

StartPoint Possible values: Coordinates. Default is "0,0" for left side. Use "1,1" for the right side.

Width Possible values: Any number

Height Possible values: Any number

<local:HorizontalBar VerticalAlignment="Top" HorizontalAlignment="Left"
   BarColor="#63bd99" ValueVariable="ClutchPedalPercentage" Width="40" Height="50" />

Back to top

Icon

Show an image created with a SVG path.

IconColor Possible values: HEX code or Application Color

Data Possible values: SVG data

Width Possible values: Any number

Height Possible values: Any number

<local:Icon Height="20"
Data="F 1 M 22.9167,12.5 C 20.6083,12.5 18.75,14.3583 18.75,16.6667 L 18.75,83.3333 C 18.75,85.4166 20.8334,87.4999 22.9167,87.4999 L 60.4167,87.4999 C 62.5,87.4999 64.5834,85.4166 64.5834,83.3333 L 64.5834,62.5 66.6667,62.5 C 68.75,62.5 68.75,64.5833 68.75,64.5833 L 68.75,72.9166 C 68.75,77.0833 70.8334,79.1666 75,79.1666 79.1667,79.1666 81.25,77.0833 81.25,72.9166 81.25,68.0554 81.25,54.1666 81.25,50 81.25,45.8334 72.9167,41.6667 72.9167,37.5 L 72.9167,25 68.75,25 64.5834,20.8334 64.5834,16.6667 C 64.5834,14.3584 62.7251,12.5 60.4167,12.5 Z M 27.0834,20.8333 L 56.2501,20.8333 56.2501,37.5 27.0834,37.5 Z M 64.5834,33.3333 L 68.75,33.3333 C 68.75,33.3333 68.75,36.8054 68.75,39.5833 68.75,43.75 77.0834,47.9166 77.0834,52.0833 L 77.0834,72.9166 C 77.0833,75 75,75 75,75 75,75 72.9167,75 72.9167,72.9167 72.9167,72.9167 72.9167,64.5833 72.9167,62.5 72.9167,60.4166 70.8333,58.3333 68.75,58.3333 67.3611,58.3333 64.5833,58.3333 64.5833,58.3333 Z"
   IconColor="FuelColor" />

Back to top

OnOff

Show a light that can have two states and two colours.

OnColor Possible values: HEX code or Transparent

OffColor Possible values: HEX code or Transparent

NumericVariable Possible values: Application Variable. Should only use variables that return a number.

ValueTreshold Possible values: Any number. If specified, when the NumericVariable is above this value, the text color is changed to OnColor.

ValueTresholdVariable Possible values: Application Variable. Should only use variables that return a number. If specified it will override the value of ValueTreshold.

Blink Possible values: True / False.

BlinkTreshold Possible values: Any number. The control will blink when the NumericVariable is equal or higher than this number.

Width Possible values: Any number

Height Possible values: Any number

Radius Possible values: Any number. A value of 50 will make it round (assuming same width and height) and a value of 0 will make it square.

BorderColor Possible values: HEX code or Transparent

BorderThickness Possible values: Any number.

<local:OnOff Width="40" Height="40" BorderThickness="2" BorderColor="#ffffff" Radius="10"
   OffColor="Transparent" OnColor="#24ff00"
   ValueTreshold="35" NumericVariable="CurrentRPMPercentage" />

Back to top

TriStateShape

Similar to the OnOff control, however in this case you have a third colour option. Also allows for the use of Application Color.

State1Color Possible values: HEX code or Application Color

State2Color Possible values: HEX code or Application Color

State3Color Possible values: HEX code or Application Color

NumericVariable Possible values: Application Variable. Should only use variables that return a number.

ValueTreshold1 Possible values: Any number. If specified, when the NumericVariable is above this value, the text color is changed to State2Color.

ValueTreshold2 Possible values: Any number. If specified, when the NumericVariable is above this value, the text color is changed to State3Color.

ValueTresholdVariable1 Possible values: Application Variable. Should only use variables that return a number. If specified it will override the value of ValueTreshold1.

ValueTresholdVariable2 Possible values: Application Variable. Should only use variables that return a number. If specified it will override the value of ValueTreshold2.

Width Possible values: Any number

Height Possible values: Any number

Radius Possible values: Any number. A value of 50 will make it round (assuming same width and height) and a value of 0 will make it square.

BorderColor Possible values: HEX code or Transparent

BorderThickness Possible values: Any number.

<local:TriStateShape ValueTresholdVariable1="BrakeColdTemperatureMax" ValueTresholdVariable2="BrakeHotTemperatureMax"
   State3Color="#DD4225" State2Color="#63BD99" State1Color="#51ABFF"
   NumericVariable="BrakeTemperatureRR" Width="10" Height="40" />

Back to top

Image

Show an image on the Display.

Source Possible values: Any string. Should start with ms-appdata:///huds/folder-name/. folder-name is the folder name you chose for your Display. GIF, JPG or PNG only.

Width Possible values: Any number

Height Possible values: Any number

<Image Source="ms-appdata:///local/huds/pcars-vhud-skeleton/some-sub-folder/image-name.png"
   Width="100" Height="100" />

Back to top

We use cookies to provide you with a better service. Carry on browsing if you're happy with this, or find out how to manage cookies.   Close this