小编Mik*_*ish的帖子

Xamarin.Forms 字体已过时

当我尝试在Xamarin.Forms上创建新标签时,我收到以下警告:

about = new Label { Text = "" ,      
                TextColor=Color.Black,
                Font = Font.SystemFontOfSize(16),//Warning occurred here 
                XAlign = TextAlignment.End,
                HorizontalOptions = LayoutOptions.EndAndExpand};
Run Code Online (Sandbox Code Playgroud)

'Xamarin.Forms.Label.Font' 已过时:'请使用类本身的字体属性。在 v1.3.0 中已废弃'

这个警告意味着什么,我应该怎么做?

c# portable-class-library xamarin.forms

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

告诉ActivityIndi​​cator展示自己,然后导航到另一个页面

Xamarin.Forms项目中,我试图告诉ActivityIndicator你自己展示然后导航到另一个页面

activityIndicatorObject = new ActivityIndicator()
                {
                    HorizontalOptions = LayoutOptions.CenterAndExpand,
                    Color = Color.Red,
                    IsVisible = false,
                    IsRunning = false,
                    IsEnabled = false,
                    BindingContext = this,
                };
ViewBookButton = new Button{ Text = "view book" };
ViewBookButton.Clicked += ViewBook;
protected void ViewBook(Object sender,EventArgs e)
            {
                //Go To View Book Page 
                activityIndicatorObject .IsVisible = true;
                activityIndicatorObject .IsRunning = true;
                activityIndicatorObject .IsEnabled = true;
                activityIndicatorObject .SetBinding(ActivityIndicator.IsVisibleProperty, "IsBusy");
                this.IsBusy = true;
                Navigation.PushAsync(new BookPage());
                this.IsBusy = false;
            }
Run Code Online (Sandbox Code Playgroud)

ActivityIndicator没有显示?我怎么能让它显示出来?

c# xamarin.ios portable-class-library xamarin xamarin.forms

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

Xamarin.forms如何像浏览器一样自动保存用户名

我正在使用Xamarin.Forms开发移动应用程序

我有以下主页包含登录信息:

在此处输入图片说明

我们如何让应用程序自动保存用户名,以使他们不必每次都键入用户名(例如在浏览器中)?

xamarin.ios xamarin.android xamarin xamarin.forms

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

Xamarin Froms Listview 未显示所有项目

你好,Xamarin 受害者,

我的 ListView 有问题,其中未显示 itemsource 中的所有项目。显示了总共 12 个项目中的 6 个。在这里,您有我的 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"
         x:Class="Prototype_Deinceps.views.subject.DetailPage"
         xmlns:multiplechoices="clr-namespace:Prototype_Deinceps.viewincludes.QuestionTypes;assembly=Prototype_Deinceps"
         xmlns:CustomElements="clr-namespace:Prototype_Deinceps.CustomElements;assembly=Prototype_Deinceps"
         Title="Detail">
<!-- ToolBar -->
<ContentPage.ToolbarItems>
<ToolbarItem Icon="Edit.png">
  <ToolbarItem.Text>
    <OnPlatform x:TypeArguments="x:String"
                iOS="Wijzig"/>
  </ToolbarItem.Text>
</ToolbarItem>
</ContentPage.ToolbarItems>

<Grid>
  <Grid.RowDefinitions>
    <RowDefinition Height="6*" />
    <RowDefinition Height= "9*" />
    <RowDefinition Height="6*" />
  </Grid.RowDefinitions>
  <Grid.ColumnDefinitions>
    <ColumnDefinition Width="*" />
    <ColumnDefinition Width="*" />
  </Grid.ColumnDefinitions>

  <!-- Top part of the screen that consist of basic info of the entity-->
  <StackLayout x:Name="BasicInfo" Margin="10,10,10,5" Grid.Row="0" Grid.Column="0">
    <Label Text="Basic Info" …
Run Code Online (Sandbox Code Playgroud)

c# xaml portable-class-library xamarin xamarin.forms

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

Xamarin.Forms无法从资源返回的Null中读取文本文件

我正在使用Xamarin.Forms,并且尝试读取文本文件时尝试从资源,返回的Null值以下代码读取文本文件。

 var assembly = typeof(BookPage).GetTypeInfo().Assembly;
 Stream stream = assembly.GetManifestResourceStream("AboutResources.txt");
Run Code Online (Sandbox Code Playgroud)

//这里的程序集返回空值,我找不到文本资源

我的代码在从ContentPagePLC项目继承的以下类下

 public class BookPage : ContentPage
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

c# portable-class-library xamarin xamarin.forms

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

为什么 ListView 不显示 WPF 上的项目?

我试图在 WPF APP 上显示列表视图值,但我只能显示标题,下面是非常简单的代码:

 public class Ticket 
    {
        public string Descrption { get; set; }
        public string Status { get; set; }
        public Ticket()
        {    
        }           
    }
Run Code Online (Sandbox Code Playgroud)

XAML:

 <ListView ItemsSource="{Binding AllTasks}" Margin="34,30,69,65">
            <ListView.View>
                <GridView>
                    <GridViewColumn DisplayMemberBinding="{Binding Descrption}" Header="Ticket" Width="150"></GridViewColumn>
                    <GridViewColumn DisplayMemberBinding="{Binding Status}" Header="Status" Width="50"></GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>



public partial class MainWindow : Window
    {
        List<Ticket> AllTasks { get; set; }
        public MainWindow() 
        {
            InitializeComponent();

            AllTasks = new List<Ticket>();           

            Ticket ticket2 = new Ticket();
            ticket2.Descrption = "test";
            ticket2.Status = "To Do"; …
Run Code Online (Sandbox Code Playgroud)

c# wpf binding

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

如何在SQL Server中发送WhereClause到EXEC

ALTER PROCEDURE [dbo].[GetTimeSheetsAttendance]

@WhereClause varchar
AS

EXEC  ('Select vwEmployeeList.ID,vwEmployeeList.Code,
        tbGNClient.FName + '' '' +  tbGNClient.MName + '' ''+ tbGNClient.LName as Name,
        EmployeeAttendanceTb.EmpAttID, EmployeeAttendanceTb.EmpAttSetupID,
        EmployeeAttendanceTb.GNClientID, EmployeeAttendanceTb.SheetID,
        EmployeeAttendanceTb.Date, EmployeeAttendanceTb.TimeIn,
        EmployeeAttendanceTb.TimeOut, EmployeeAttendanceTb.HasExtraTime,
        EmployeeAttendanceTb.ExtraTime, EmployeeAttendanceTb.TotalOfHours,
        EmployeeAttendanceTb.TotalOfCost, EmployeeAttendanceTb.Description,
        vwEmployeeList.Department,
        EmployeeAttendSetup.NoMaximumUnits,
        EmployeeAttendSetup.NoMinimumUnits
        From EmployeeAttendanceTb
        LEFT JOIN vwEmployeeList on EmployeeAttendanceTb.GNClientID = vwEmployeeList.ID
        LEFT JOIN tbGNClient on vwEmployeeList.ID = tbGNClient.GNClientID
        LEFT JOIN EmployeeAttendSetup on EmployeeAttendanceTb.GNClientID = EmployeeAttendSetup.EmpID And EmployeeAttendanceTb.EmpAttSetupID  = EmployeeAttendSetup.AttndUnitsID
        ' + ' ' + @WhereClause)
Run Code Online (Sandbox Code Playgroud)

注意:@WhereClause是从C#应用程序发送的参数.

DBType=nvarchar.. 
@WhereClause.Value= "Where EmployeeAttendanceTb.GNClientID=17"
Run Code Online (Sandbox Code Playgroud)

例外:

尝试使用数据访问应用程序块时出现一些问题,请检查以下错误消息:"W"附近的语法不正确.

c# sql-server exec

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

Xamarin.Forms如何将按钮文本对齐到右侧

我正在使用Xamarin.Forms,我需要在ButtonControl上右侧对齐文本.

  var FirstNameButton = new Button { Text ="First Name "}; 
Run Code Online (Sandbox Code Playgroud)

任何的想法 ?

xamarin xamarin.forms

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

我怎么能隐藏"这可能会花钱你"

我正在使用Eclipse开发本机Android应用程序,我在Android Manifest上添加了以下权限

 <uses-permission android:name="android.permission.CALL_PHONE" />
Run Code Online (Sandbox Code Playgroud)

然后,当我尝试在我的设备上安装Android应用程序时,我收到以下消息:

直接拨打电话号码可能会花费你的钱

我可以做些什么来隐藏这条消息,因为我认为这对用户不友好吗?也许我需要使用另一个许可,这是一个没有许可的更接近的许可?

我在我的适配器上使用了以下代码:

   public void onClick(View v) { 
           Intent callIntent = new Intent(Intent.ACTION_CALL);
           callIntent.setData(Uri.parse(PhoneCall));
           v.getContext().startActivity(callIntent); }
       });
Run Code Online (Sandbox Code Playgroud)

java eclipse android android-layout

-4
推荐指数
1
解决办法
328
查看次数