### Start Beacon Monitoring Command (XAML)
Source: https://community.rockrms.com/developer/mobile-docs/essentials/advanced-topics/proximity-attendance
Initiates the beacon monitoring process. This basic example shows a button that triggers the StartBeaconMonitoring command. It guides the user through enabling location permissions.
```XAML
```
--------------------------------
### Start Beacon Monitoring with Custom Parameters (XAML)
Source: https://community.rockrms.com/developer/mobile-docs/essentials/advanced-topics/proximity-attendance
Customizes the user experience for starting beacon monitoring by allowing specific titles for permission and settings pages. This example demonstrates how to pass custom parameters to the StartBeaconMonitoring command.
```XAML
```
--------------------------------
### Detail Page Linking Example - Rock RMS
Source: https://community.rockrms.com/developer/mobile-docs/essentials/blocks/connection/connection-type-list_Version=1.0.0
This code snippet shows how to implement navigation to a detail page when a connection type is selected. It utilizes Liquid templating and XAML gesture recognizers to pass the connection type's GUID as a query parameter.
```Liquid
{% if DetailPage != null %}
{% endif %}
```
--------------------------------
### Logout Command Examples
Source: https://community.rockrms.com/developer/mobile-docs/essentials/commands/utility-commands
Provides examples for the Logout command. It shows a basic logout and implies the possibility of using CommandParameter to reload the current page or navigate to a specific page using its Guid.
```XAML
```
--------------------------------
### Default Context Menu Example
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/content-controls/context-menu_Version=1.0.0
This example demonstrates how to attach a default context menu to a Border control. The menu appears when the border is held down. It includes nested MenuGroups and MenuActions with commands and destructive options.
```xml
```
--------------------------------
### FollowingIcon Example Usage
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/content-controls/following-icon
An example demonstrating how to use the FollowingIcon control to display a group's name and a follow icon.
```APIDOC
## FollowingIcon Example Usage
### Description
This example shows how to display a group's name alongside a FollowingIcon, allowing users to follow or unfollow the group. It utilizes default icons and demonstrates setting custom colors.
### Example
```html
{% assign group = 41 | GroupById %}
```
This code snippet will render a horizontal layout containing the group's name and a star icon. The icon's state (filled or empty) and color will reflect whether the current user is following the group. The `IsFollowed` property dynamically sets the initial state based on the user's current following status for the specified group.
```
--------------------------------
### YouVersion Bible App Deep Linking
Source: https://community.rockrms.com/developer/mobile-docs/essentials/tips-and-tricks
Provides a button example for opening external links, specifically for the YouVersion Bible app. If the app is installed, the link will open natively; otherwise, it falls back to a web browser. The CommandParameter is used to pass the URL.
```XAML
```
--------------------------------
### ShareContentParameters Example (XAML)
Source: https://community.rockrms.com/developer/mobile-docs/essentials/commands/communication-commands
Demonstrates the use of the ShareContentParameters object in XAML to configure sharing options. This example includes Title, Text, and Uri, illustrating how different combinations affect the sharing experience.
```XAML
```
--------------------------------
### Push Page with GUID
Source: https://community.rockrms.com/developer/mobile-docs/essentials/commands/navigation-commands_Version=1.0.0
Navigates to a new page by pushing it onto the navigation stack, identified by its GUID. Users can return to the previous page using the back button. Query string parameters can be appended to the GUID, separated by '?' and '&', and must be properly escaped within XML.
```xaml
```
--------------------------------
### Bible Reader Control Example
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/content-controls/bible-reader
This example demonstrates how to use the Bible Reader control to display specific Bible verses. It shows how to set the 'Reference' property to a verse range and disable the display of headings.
```xml
```
--------------------------------
### Create 'Get to Know God' Content Channel
Source: https://community.rockrms.com/developer/mobile-docs/essentials/blocks/cms/daily-challenge-entry_Version=1.0.0
Establishes the main content channel for the 'Get to Know God' challenge. It uses the 'Multi-Day Challenge' type, links to the 'Challenge Items' child channel, and enables manual ordering for both the channel and its child items.
```Rock RMS Configuration
Name = Get to Know God
Type = Multi-Day Challenge
Child Content Channels = Challenge Items
Items Manually Ordered = Yes
Child Items Manually Ordered = Yes
```
--------------------------------
### Rock.MediaPlayer with Watch Tracking
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/content-controls/media-player/legacy_Version=1.0.0
This example demonstrates how to configure the Rock.MediaPlayer to save watch interactions for a media element. It includes SQL queries to retrieve interaction data and Liquid templating to dynamically set player parameters.
```cshtml
{% mediaelement id:'1' %}
{% assign interactionGuid = null %}
{% assign watchMap = null %}
{% if CurrentPerson and CurrentPerson != null %}
{% sql personId:'{{ CurrentPerson.Id }}' mediaId:'{{ mediaelement.Id }}' %}
SELECT TOP 1
[I].[Guid],
[I].[InteractionData]
FROM [Interaction] AS [I]
INNER JOIN [InteractionComponent] AS [IComp] ON [IComp].[Id] = [I].[InteractionComponentId]
INNER JOIN [InteractionChannel] AS [IChan] ON [IChan].[Id] = [IComp].[InteractionChannelId]
INNER JOIN [PersonAlias] AS [PA] ON [PA].[Id] = [I].[PersonAliasId]
WHERE [IChan].[Guid] = 'D5B9BDAF-6E52-40D5-8E74-4E23973DF159'
AND [PA].[PersonId] = @personId
AND [IComp].[EntityId] = @mediaId
AND [I].[InteractionDateTime] >= DATEADD(DAY, -7, GETDATE())
ORDER BY [I].[InteractionDateTime] DESC
{% endsql %}
{% assign result = results | First %}
{% if result != null %}
{% assign interactionGuid = result.Guid %}
{% assign watchMap = result.InteractionData | FromJSON | Property:'WatchMap' %}
{% endif %}
{% endif %}
{% endmediaelement %}
```
--------------------------------
### Workflow QR Code Format
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/content-controls/campus-context-picker/camera-code-reader
This example illustrates the format for a workflow QR code. Codes start with 'RK:WF:' followed by a workflow GUID and optional query string parameters for passing default values.
```text
RK:WF:25af66d6-0b7f-41b8-a8ca-bf912574eeb1?GroupId=20&Mode=auto
```
--------------------------------
### Get Connection Type GUID (SQL)
Source: https://community.rockrms.com/developer/mobile-docs/essentials/blocks/connection/connection-opportunity-list
This SQL query retrieves the Name and Guid for all available Connection Types. You will need to select the Guid of the specific connection type you wish to display opportunities for.
```sql
SELECT Name,Guid FROM [ConnectionType]
```
--------------------------------
### Show Context Menu on Button Click
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/content-controls/context-menu_Version=1.0.0
This example shows how to make a context menu appear instantly when a Button is clicked, rather than requiring a long press. The Menu must be attached to a Button for this functionality.
```xml
```
--------------------------------
### Multiple Confetti Systems in a Single View (XAML)
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/content-controls/confetti-view
Illustrates how to implement multiple, distinct confetti systems within a single Rock:ConfettiView. This example shows a combination of an infinite emitter and a burst emitter, each with its own set of customizable properties, allowing for complex visual effects.
```xaml
Grid Rock:Zone.Expands="true">
```
--------------------------------
### Get Connection Opportunity GUIDs (SQL)
Source: https://community.rockrms.com/developer/mobile-docs/essentials/blocks/connection/connection-request-list
This SQL query retrieves the Name and Guid of all available Connection Opportunities. This is necessary to identify the specific opportunity for which you want to display requests.
```sql
SELECT Name, Guid FROM [ConnectionOpportunity]
```
--------------------------------
### Callback Command Example
Source: https://community.rockrms.com/developer/mobile-docs/essentials/commands/utility-commands
Demonstrates how to use the Callback command with a plain string for the callback name and with CallbackParameters for passing arguments. The CommandParameter is used to specify the callback function name or an instance of CallbackParameters.
```XAML
```
--------------------------------
### Start Animation Automatically on Load (XAML)
Source: https://community.rockrms.com/developer/mobile-docs/essentials/animations_Version=1.0.0
This example shows how to automatically start a 'FadeOut' animation when a Label element is loaded. It utilizes a Rock:BeginAnimationBehavior attached to the Label, which triggers the animation shortly after the element is attached to its parent. A small delay is inherent to this behavior.
```xaml
```
--------------------------------
### Countdown Timer with Lava Filter for Dynamic Date
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/content-controls/countdown_Version=1.0.0
This example shows how to dynamically set the countdown's start time using a Lava filter. It calculates the start date by adding a specified number of days to the current date, offering more flexibility than a static string.
```Rock RMS / Lava
```
--------------------------------
### CopyToClipboard Command Example
Source: https://community.rockrms.com/developer/mobile-docs/essentials/commands/utility-commands
Shows how to use the CopyToClipboard command to set text to the user's clipboard. The CommandParameter directly accepts the string content to be copied.
```XAML
```
--------------------------------
### Multi Picker XAML Example
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/form-fields/multi-picker
This XAML snippet demonstrates how to implement the Rock RMS Multi Picker control. It shows how to set the label, required status, and initial selected values using a comma-delimited string. The example also includes nested PickerItem elements for defining selectable options.
```xaml
```
--------------------------------
### StyledView with Linear Gradient Brush
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/content-controls/styled-view_Version=1.0.0
This example illustrates how to apply a LinearGradientBrush to a StyledView for custom background gradients. It configures the start and end points of the gradient and includes gradient stops with specific colors and offsets.
```XAML
```
--------------------------------
### Link to Page with Entity Context Parameter
Source: https://community.rockrms.com/developer/mobile-docs/essentials/blocks/cms/content
Example of linking to a page and passing an entity context parameter, specifically a GUID, for a person profile page. This allows the target page to identify and display specific person data.
```XAML
...
```
--------------------------------
### Align Buttons Inline - RockRMS
Source: https://community.rockrms.com/developer/mobile-docs/styling/legacy/styling-components/button_Version=1.0.0
Provides examples of how to make buttons display inline and control their horizontal alignment using the HorizontalOptions property. Options include Center, Start (left), and End (right).
```RockRMS
```
```RockRMS
```
```RockRMS
```
--------------------------------
### Create Entity Set and Navigate (XAML)
Source: https://community.rockrms.com/developer/mobile-docs/essentials/commands/utility-commands_Version=1.0.0
Generates an entity set based on provided parameters and then navigates to a new page, appending the entity set as a query string parameter. This is useful for creating temporary data collections and navigating with context.
```XAML
```
--------------------------------
### Page QR Code Format
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/content-controls/campus-context-picker/camera-code-reader
This example shows the format for a page QR code. Codes begin with 'RK:PG:' followed by a page GUID and optional query string parameters for navigation.
```text
RK:PG:6cb5d894-02e1-4868-93b1-6d52d94295de?source=qrcode
```
--------------------------------
### Rock RMS Campus Picker Example (RockML)
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/form-fields/campus-picker
This code snippet demonstrates how to implement the Rock RMS Campus Picker component within a RockML view. It shows how to set basic properties like Label, IsRequired, and SelectedValue. This component automatically fetches and displays a list of campuses configured on the Rock server.
```RockML
```
--------------------------------
### Advanced Confetti Animation Configuration in XAML
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/content-controls/confetti-view_Version=1.0.0
This example demonstrates a more advanced configuration of the Rock.ConfettiSystem within a Rock.ConfettiView. It utilizes a 'Burst' emitter with specific lifetime, angles, velocities, and custom emitter position and physics properties. This allows for fine-grained control over the confetti's behavior and appearance.
```xaml
```
--------------------------------
### Convert String to Guid in XAML using NullableGuidConverter
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/xaml-extensions/nullable-guid-converter
This XAML snippet demonstrates how to use the NullableGuidConverter to convert a string value from the 'ItemGuid' binding into a Guid type. This is necessary for properties or bindings that strictly require a Guid type, even if the string contains a valid Guid.
```xaml
```
--------------------------------
### XML Example: Using CommandReference with Button and AggregateCommandParameters
Source: https://community.rockrms.com/developer/mobile-docs/essentials/controls/developer-controls/command-reference
This XML snippet demonstrates how to use the CommandReference object within a Button's Command property, leveraging AggregateCommandParameters to chain multiple commands. It shows how to bind commands and specify command parameters, including nested CommandReference objects with their own parameters.
```xml
```
--------------------------------
### Configure Connection Opportunity List Block (Liquid/Rock)
Source: https://community.rockrms.com/developer/mobile-docs/essentials/blocks/connection/connection-opportunity-list
This Liquid/Rock template snippet demonstrates how to configure the Connection Opportunity List block using query parameters. It sets the pageGuid and connectionTypeGuid, then uses a Rock:PushPageParameters tag to navigate to a page displaying opportunities for the specified connection type.
```liquid
{% assign pageGuid = '' %}
{% assign connectionTypeGuid = 'dd565087-a4be-4943-b123-bf22777e8426' %}
```
--------------------------------
### Hero Block Lava Example for Title
Source: https://community.rockrms.com/developer/mobile-docs/essentials/blocks/cms/hero
An example demonstrating how to use Lava to dynamically set the Hero block's title. This specific example uses the CurrentPerson.FirstName Lava variable to display the logged-in user's first name as the title.
```lava
{{ CurrentPerson.FirstName }}
```
--------------------------------
### Action Panel with Aggregate Bindings and Nested Commands
Source: https://community.rockrms.com/developer/mobile-docs/essentials/commands_Version=1.0.0
This complex example showcases how to handle nested action items like `ShowActionPanel` with aggregate bindings. It demonstrates passing `BindingContext` references to maintain functionality at deeper nesting levels, including nested commands within action panel buttons.
```xml