Show / Hide Table of Contents

Class ControllerViewModel

Virtual controller view model

Inheritance
System.Object
ControllerViewModel
Implements
System.ComponentModel.INotifyPropertyChanged
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Input
Assembly: Phoenix.Plugin.Input.dll
Syntax
public class ControllerViewModel : INotifyPropertyChanged, IDisposable

Constructors

View Source

ControllerViewModel(ControllerSelectorViewModel, IDevice, Int32)

Initializes a new instance of the ControllerViewModel class

Declaration
public ControllerViewModel(ControllerSelectorViewModel parent, IDevice device, int slot)
Parameters
Type Name Description
ControllerSelectorViewModel parent

Parent view model

IDevice device

Device to attach to

System.Int32 slot

Slot to attach to

Properties

View Source

BindWithUser

Gets or sets a command to bind with a specific user.

Declaration
public DelegateCommand<PhoenixUser> BindWithUser { get; set; }
Property Value
Type Description
DelegateCommand<PhoenixUser>
View Source

BindWithUserExclusive

Gets or sets a command to exclusively bind with a specific user.

Declaration
public DelegateCommand<PhoenixUser> BindWithUserExclusive { get; set; }
Property Value
Type Description
DelegateCommand<PhoenixUser>
View Source

ChangeLanguage

Gets or sets command to change language

Declaration
public DelegateCommand<string> ChangeLanguage { get; set; }
Property Value
Type Description
DelegateCommand<System.String>
View Source

ChangeSandbox

Gets or sets command to change sandbox

Declaration
public DelegateCommand<string> ChangeSandbox { get; set; }
Property Value
Type Description
DelegateCommand<System.String>
View Source

ChromeColor

Gets the chrome color depending on selection

Declaration
public Color ChromeColor { get; }
Property Value
Type Description
System.Windows.Media.Color
View Source

Device

Gets the device the virtual controller is attached to

Declaration
public IDevice Device { get; }
Property Value
Type Description
IDevice
View Source

DisconnectController

Gets or sets command to disconnect controller

Declaration
public DelegateCommand DisconnectController { get; set; }
Property Value
Type Description
DelegateCommand
View Source

IsInErrorState

Gets a value indicating whether or not the gamepad is in a state where it cannot be used.

Declaration
public bool IsInErrorState { get; }
Property Value
Type Description
System.Boolean
View Source

IsSelected

Gets or sets a value indicating whether the controller has been picked

Declaration
public bool IsSelected { get; set; }
Property Value
Type Description
System.Boolean
View Source

Parent

Gets the parent view model

Declaration
public ControllerSelectorViewModel Parent { get; }
Property Value
Type Description
ControllerSelectorViewModel
View Source

RefreshUserBindings

Gets or sets a command to refresh user bindings.

Declaration
public DelegateCommand RefreshUserBindings { get; set; }
Property Value
Type Description
DelegateCommand
View Source

Slot

Gets or sets the slot the virtual controller is attached to

Declaration
public int Slot { get; set; }
Property Value
Type Description
System.Int32
View Source

Status

Gets or sets the status for the virtual controller.

Declaration
public GamepadStatus Status { get; set; }
Property Value
Type Description
GamepadStatus
View Source

StatusMessage

Gets the status message for the gamepad.

Declaration
public string StatusMessage { get; }
Property Value
Type Description
System.String
View Source

SupportsUserBinding

Gets a value indicating whether or not the device supports user binding.

Declaration
public bool SupportsUserBinding { get; }
Property Value
Type Description
System.Boolean
View Source

Users

Gets the collection of users for a device.

Declaration
public ObservableCollection<PhoenixUser> Users { get; }
Property Value
Type Description
System.Collections.ObjectModel.ObservableCollection<PhoenixUser>

Methods

View Source

Disconnect()

Disconnects the virtual controller

Declaration
public void Disconnect()
View Source

Dispose()

Disposes the view model.

Declaration
public void Dispose()
View Source

HoldButton(GamepadButtons)

Presses a button

Declaration
public void HoldButton(GamepadButtons button)
Parameters
Type Name Description
GamepadButtons button

Button to press and release

View Source

MoveLeftTrigger(Double)

Moves the LeftTrigger

Declaration
public void MoveLeftTrigger(double value)
Parameters
Type Name Description
System.Double value

Value to set to

View Source

MoveRightTrigger(Double)

Sets the RightTrigger

Declaration
public void MoveRightTrigger(double value)
Parameters
Type Name Description
System.Double value

Value to set to

View Source

OnControllerError(Object, EventArgs)

Handle virtual gamepad errors

Declaration
protected void OnControllerError(object sender, EventArgs e)
Parameters
Type Name Description
System.Object sender

Sender object

System.EventArgs e

Event arguments

View Source

OnControllerReconnect(Object, EventArgs)

Handle reconnection

Declaration
protected void OnControllerReconnect(object sender, EventArgs e)
Parameters
Type Name Description
System.Object sender

Sender object

System.EventArgs e

Event arguments

View Source

Refresh(Dispatcher)

Updates the controller screenshot

Declaration
public void Refresh(Dispatcher dispatcher)
Parameters
Type Name Description
System.Windows.Threading.Dispatcher dispatcher

Dispatcher to use for UI notifications

View Source

ReleaseButton(GamepadButtons)

Release button

Declaration
public void ReleaseButton(GamepadButtons button)
Parameters
Type Name Description
GamepadButtons button

Button to release

View Source

SetLeftThumbStickX(Double)

Sets the Left Thumb Stick X

Declaration
public void SetLeftThumbStickX(double value)
Parameters
Type Name Description
System.Double value

Value to set to

View Source

SetLeftThumbStickY(Double)

Sets the Left Thumb Stick Y

Declaration
public void SetLeftThumbStickY(double value)
Parameters
Type Name Description
System.Double value

Value to set to

View Source

SetRightThumbStickX(Double)

Sets the Right Thumb Stick X

Declaration
public void SetRightThumbStickX(double value)
Parameters
Type Name Description
System.Double value

Value to set to

View Source

SetRightThumbStickY(Double)

Sets the Right Thumb Stick Y

Declaration
public void SetRightThumbStickY(double value)
Parameters
Type Name Description
System.Double value

Value to set to

Events

View Source

PropertyChanged

Property changed event required for INotifyPropertyChanged support

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type Description
System.ComponentModel.PropertyChangedEventHandler
View Source

SelectionChanged

Selection changed event

Declaration
public event EventHandler SelectionChanged
Event Type
Type Description
System.EventHandler

Implements

System.ComponentModel.INotifyPropertyChanged
System.IDisposable
  • View Source
In This Article
Back to top Generated by DocFX