Tritium UI

TritiumSwitch

ผูกค่าบูลีนกับสวิตช์ที่ตามสีเน้นของ Tritium

TritiumSwitch

คุณสมบัติหลัก

  • ผูก IsToggled สองทาง
  • ใช้สีเน้นของธีมที่ใช้งานสำหรับสถานะเปิด
  • ไม่สนใจการอัปเดตจากโค้ด เพื่อให้การตอบสนองเล่นเฉพาะเมื่อผู้ใช้สลับ
  • เลือกเปิดการตอบสนองแบบสั่นหรือเสียง
  • DataForm ใช้กับคุณสมบัติ bool

แพลตฟอร์ม

Android, iOS, Mac Catalyst และ Windows 10 เวอร์ชัน 19041 ขึ้นไป (.NET 10 MAUI)

API หลัก

  • IsToggled . The on/off value, two-way.
  • HapticFeedback . Opt-in haptic feedback for a user toggle; InputSound is the matching sound switch. Both default off.

ตัวอย่างพื้นฐาน

ประกาศเนมสเปซนี้บนหน้า

xmlns:editors="clr-namespace:Tritium.Maui.Editors;assembly=Tritium.Maui.Editors"
<editors:TritiumSwitch IsToggled="True" />

เพิ่มแหล่งแพ็กเกจจากไลเซนส์ แล้วอ้างอิงแพ็กเกจที่มีคอนโทรลนี้ แพ็กเกจเหล่านี้ไม่อยู่ในแกลเลอรี NuGet สาธารณะ

Ask Tritium

How-to help and product fit for FleetPro, Tritium UI, and Tritium Reporting.

Ask how to use a feature, or tell us your company, platforms, team size, and use case. Pricing and upgrades go to sales.

Product fit
Contact sales

Search the FAQ