小编Bjo*_*ine的帖子

在Xamarin.Forms中使用XAML中的资源文件

我正在尝试在我的XAML中使用资源文件.由于某种原因,我一直得到没有找到类型的错误Texts.不知道我在这里做错了什么.

XAML

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:CashRegisterApp.Resources"
             x:Class="CashRegisterApp.Start">
    <ContentPage.Content>
        <StackLayout
            VerticalOptions="CenterAndExpand" 
                HorizontalOptions="CenterAndExpand" >
        <Label Text="{x:Static local:Texts.Start}"/>
        </StackLayout>
    </ContentPage.Content>
</ContentPage>
Run Code Online (Sandbox Code Playgroud)

RESX

resx文件

解决方案探索者

解决方案探索者

xaml resx xamarin xamarin.forms

7
推荐指数
1
解决办法
3016
查看次数

向控制器添加新方法会使 swagger 给出 500 错误

自从我制作 API 以来已经有一段时间了。现在我再次查看它,并尝试简单地将 get 方法添加到WeatherForecastController. 但添加后我一直收到一个招摇错误。该方法看起来与现有方法非常相似。只是这个使用了一个参数。但添加后,我的浏览器中不断出现错误。我不知道为什么。我已经很长时间没有这样做了。而且我以前从未使用过 swagger。

截屏

请注意,我只是创建了项目并添加了我所做的全部工作。这是浏览器错误。

截屏

.net c# controller .net-core

3
推荐指数
1
解决办法
1726
查看次数

在 Visual Studio 代码中有不同的选项卡大小

我正在使用 Visual Studio 代码来编程 cobol。但是,我希望能够为第一个和第二个选项卡设置不同的选项卡大小,然后将大小更改为 3 个空格。但是我不知道如何设置它。这就是我希望它设置的方式。

first tab = 7 spaces.
2nd tab = 1 space.
3th tab = 4 spaces.
4th and ongoing = 3 spaces.
Run Code Online (Sandbox Code Playgroud)

我找到了如何为我的所有选项卡将其设置为 3 个空格。这些是我目前的自我设置。

{
    "editor.tabSize": 3,
    "editor.detectIndentation": false,
    // Insert spaces when pressing Tab. This setting is overriden
    // based on the file contents when `editor.detectIndentation` is true.
    "editor.insertSpaces": true
}
Run Code Online (Sandbox Code Playgroud)

configuration-files visual-studio-code

1
推荐指数
1
解决办法
5733
查看次数