Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xaml 样式未应用于Xamarin.Forms中的按钮?_Xaml_Xamarin_Xamarin.forms - Fatal编程技术网

Xaml 样式未应用于Xamarin.Forms中的按钮?

Xaml 样式未应用于Xamarin.Forms中的按钮?,xaml,xamarin,xamarin.forms,Xaml,Xamarin,Xamarin.forms,我正在处理的ContentPage中有这种样式: <ContentPage.Resources> <ResourceDictionary> <Style x:Key="buttonStyle" TargetType="Button"> <Setter Property="BorderColor" Value="Orange"/> <Set

我正在处理的ContentPage中有这种样式:

 <ContentPage.Resources>
        <ResourceDictionary>
            <Style x:Key="buttonStyle" TargetType="Button">
                <Setter Property="BorderColor" Value="Orange"/>
                <Setter Property="BorderRadius" Value="5"/>
                <Setter Property="BorderWidth" Value="5"/>
                <Setter Property="TextColor" Value="Orange"/>
                <Setter Property="BackgroundColor" Value="Transparent"/>
                <Setter Property="FontSize" Value="13"/>
                <Setter Property="HorizontalOptions" Value="EndAndExpand"/>
            </Style>
        </ResourceDictionary>
    </ContentPage.Resources>

并将其应用到按钮上:

<Button Grid.Row="0" Grid.Column="0" Text="New user" Style="{StaticResource buttonStyle}"/>

我想要完成的是这样的事情(用MS Paint绘制):

但这就是我(从Android emulator)得到的:


我觉得代码很好


请尝试卸载应用程序并删除bin和obj文件夹,然后重新生成并部署。

我觉得代码很好

请尝试卸载应用程序并删除bin和obj文件夹,然后重新生成并部署