【问题标题】:SyncFusion Radio Button Group AppearanceSyncFusion 单选按钮组外观
【发布时间】:2021-09-28 06:16:21
【问题描述】:

我怎样才能改变我的单选按钮看起来像这样:

到这里:

<radiobutton:SfRadioGroup x:Name="radioGroup" Orientation="Horizontal" HorizontalOptions="CenterAndExpand">
     <radiobutton:SfRadioButton x:Name="asc" Text="Ascending" IsChecked="True"/>
     <radiobutton:SfRadioButton x:Name="desc" Text="Descending"/>
</radiobutton:SfRadioGroup>

【问题讨论】:

    标签: c# visual-studio radio-button syncfusion


    【解决方案1】:

    您可以尝试使用SfSegmentedControl 替换 Radiobutton 以获得您想要的。

    这是一个您可以参考的代码示例。

    xmlns:buttons="clr-namespace:Syncfusion.XForms.Buttons;assembly=Syncfusion.Buttons.XForms"
    xmlns:segmentCollection="clr-namespace:System.Collections.Generic;assembly=netstandard"
    

    <buttons:SfSegmentedControl
        Grid.Row="1"
        Grid.Column="1"
        SelectionTextColor = "White"
        HeightRequest="80"
        VisibleSegmentsCount="2"
        Color="Transparent"
        BorderColor="Purple"
        BorderThickness="2"
        SelectedIndex="1"
        FontColor="Purple"
        FontSize="20"
        BackgroundColor="Transparent"
        CornerRadius="15">
        <segmentCollection:List x:TypeArguments="x:String">
            <x:String>Ascending</x:String>
            <x:String>Descending</x:String>
        </segmentCollection:List>
    </buttons:SfSegmentedControl>
    

    【讨论】:

      【解决方案2】:

      我们已经分析了报告的查询。我们已经通过使用 SfSegmentedControl 实现了您的要求。请提供示例和屏幕截图供您参考,

      示例:https://www.syncfusion.com/downloads/support/directtrac/general/ze/SfSegmentedControlSample438451283

      截图

      有关SfSegmentedControl的更多信息,请参考以下UG链接,

      UG 链接:Xamarin 分段控制控件入门 |同步融合

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多