Changes

Mobile XAML

1,709 bytes added, 17 February
/* Feature related */
This command can be used to [[Custom_View_(Client)|display custom views]].
{{UnderConstructionStart}}
=== Flashlight ===
For the Mobile clients, it is possible to control the system flashlight via customizing and switch it on or off.
The available properties can, for example, be bound to a Switch or CheckBox, as demonstrated below. These properties allow you to:
* Determine whether the device supports flashlight functionality (IsFlashSupported)
* Check whether the flashlight is currently turned on or off (IsFlashEnabled)
* Toggle the flashlight on or off via user interaction (SwitchFlashLight)
<br/>
If an attempt is made to enable the flashlight on a device that does not provide flashlight support, no action is performed.
{| class="wikitable"
! Switch
! controls:CheckBox
|-
|
<syntaxhighlight lang="xml">
<Switch IsToggled="{Binding AppStatus.SwitchFlashLight, Mode=TwoWay}"/>
</syntaxhighlight>
||
<syntaxhighlight lang="xml">
<controls:CheckBox
x:Name="PropertyToggle"
CheckSymbol="&#x1F526;"
IsVisible="{Binding AppStatus.IsFlashSupported}"
IsChecked="{Binding AppStatus.SwitchFlashLight, Mode=TwoWay}"
Style="{DynamicResource UBIKIconToggleButton}"
SymbolSize="20">
<controls:CheckBox.Triggers>
<DataTrigger
Binding="{Binding AppStatus.IsFlashEnabled}"
TargetType="controls:CheckBox"
Value="True">
<Setter Property="Background" Value="{StaticResource UBIKAccentColor}" />
</DataTrigger>
</controls:CheckBox.Triggers>
</controls:CheckBox>
</syntaxhighlight>
|-
|}
{{UnderConstructionEnd}}
[[Category:Client|Xamarin XAML]]
[[Category:Mobile|Mobile XAML]]
[[Category:Pages with broken file links|Xamarin XAML]]
[[Category:Styling|Xamarin XAML]]
[[Category:XAML|Xamarin XAML]]
== Performance ==
117
edits