Class ColorBlock
Assembly: Mux.Markup.UI.dll
Syntax
public class ColorBlock : IMarkupExtension<UnityEngine.UI.ColorBlock>
Examples
<m:RectTransform
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:m="clr-namespace:Mux.Markup;assembly=Mux.Markup"
xmlns:mu="clr-namespace:Mux.Markup;assembly=Mux.Markup.UI"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:playgroundMarkup="clr-namespace:Mux.Playground.Markup;assembly=Assembly-CSharp">
<!--
Note that you can use "using" scheme instead of "clr-namespace" to omit assembly
specification if:
- the referenced type is in an assembly already loaded. (interpreter)
- the referenced type is in the assembly containing the compiled XAML. (compiler)
-->
<mu:StandaloneInputModule />
<mu:Canvas />
<mu:CanvasScaler UiScale="{mu:ConstantPhysicalSize}" />
<mu:GraphicRaycaster />
<mu:VerticalLayoutGroup />
<!--
You have to give property name "Path" to Binding and "Name" to
x:Reference only when you compile the interpreter with IL2CPP.
It is because ContentPropertyAttribute does not work with IL2CPP.
-->
<mu:Selectable TargetGraphic="{Binding Path=Body, Source={x:Reference Name=targetGraphic}}">
<mu:Selectable.Colors>
<mu:ColorBlock
ColorMultiplier="0.5"
NormalColor="{m:Color R=0, G=0, B=0}"
PressedColor="{m:Color R=0, G=0, B=1}"
HighlightedColor="{m:Color R=0, G=1, B=0}"
DisabledColor="{m:Color R=1, G=0, B=0}" />
</mu:Selectable.Colors>
</mu:Selectable>
<mu:Image x:Name="targetGraphic" />
<playgroundMarkup:TextTransform Text="See what happens if you click or change Interactive property of mu:Selectable!" />
</m:RectTransform>
Properties
|
Improve this Doc
View Source
ColorMultiplier
Declaration
public float ColorMultiplier { get; set; }
Property Value
|
Improve this Doc
View Source
DisabledColor
Declaration
public UnityEngine.Color DisabledColor { get; set; }
Property Value
|
Improve this Doc
View Source
FadeDuration
Declaration
public float FadeDuration { get; set; }
Property Value
|
Improve this Doc
View Source
HighlightedColor
Declaration
public UnityEngine.Color HighlightedColor { get; set; }
Property Value
|
Improve this Doc
View Source
NormalColor
Declaration
public UnityEngine.Color NormalColor { get; set; }
Property Value
|
Improve this Doc
View Source
PressedColor
Declaration
public UnityEngine.Color PressedColor { get; set; }
Property Value
|
Improve this Doc
View Source
SelectedColor
Declaration
public UnityEngine.Color SelectedColor { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
ProvideValue(IServiceProvider)
Declaration
public UnityEngine.UI.ColorBlock ProvideValue(IServiceProvider serviceProvider)
Parameters
Type |
Name |
Description |
IServiceProvider |
serviceProvider |
|
Returns