Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all 89864 articles
Browse latest View live

How to add Quit menu item to MacOS Xamarin.Forms application

$
0
0

I created a blank Xamarin.Forms application for iOS and Android and then manually added a Mac Cocoa app. When starting the Mac Cocoa app a standard menubar is rendered.

I then modified the Mac app to use Xamarin.Forms and almost all the menubar is gone and there is no AppMenu:Quit item.

How can I create a AppMenu:Quit item?

More details

Note: Am new user and can't post actual links -- so links below don't have the http suffix.

Example repo: github.com/stepheneb/TestAppMenu

Created a blank Xamarin.Forms application for iOS and Android.

  • TestAppMenu
  • TestAppMenu.Android
  • TestAppMenu.iOS

Created Mac Cocoa app TestAppMenu.MacOS.

All projects use these nuget packages:

  • Xamarin.Forms, v4.1.0.581479
  • Xamarin.Essentials, v1.2.0

When running TestAppMenu.MacOS (which is not yet a Xamarin.Forms app) normal menus appeared including AppMenu:Quit.

Convert TestAppMenu.MacOS to Xamarin.Forms app

See:

  • devblogs.microsoft.com/xamarin/preview-bringing-macos-to-xamarin-forms/
  • stackoverflow.com/questions/52415863/xamarin-forms-targeting-macos

Now running TestAppMenu.MacOS most of normal MacOS menubar is gone including AppMenu:Quit. Only item is **Test*, first item in AppMenu but mouse down does not display menu.

Have not yet deleted TestAppMenu.MacOS/Main.storyboard.

Have experimented with suggestion in this post but haven't seen any effect.

  • stackoverflow: Xamarin - XAML - top bar app menu
  • stackoverflow.com/questions/51443019/xamarin-xaml-top-bar-app-menu

See branch: github.com/stepheneb/TestAppMenu/commits/add-nsmenu-in-app-delegate

Development Environment:

Visual Studio Community 2019 for Mac
Version 8.1.5 (build 9)
Installation UUID: b2583bc2-8f6d-4185-8a47-799c9278dca5
    GTK+ 2.24.23 (Raleigh theme)
    Xamarin.Mac 5.6.0.25 (d16-0 / 50f75273)
    Package version: 518010028

Apple Developer Tools
Xcode 10.3 (14492.2)
Build 10G8

Xamarin.Mac
Version: 5.10.0.157 (Visual Studio Community)
Hash: 6bd94753
Branch: d16-1
Build date: 2019-06-12 17:28:48-0400

Is there any way to convert PDF to Image in xamarin forms or display pdf in page ?

$
0
0

Hello, I am working with PDF files in my app.

I want to show a thumbnail for each pdf and when the user clicks the thumbnail the pdf is opened in the App.

Is there any way to show a pdf thumbnail in a page and open the pdf on an other page when it is clicked? If there isn't is there any way to convert the pdf file to an image?

I already did the same thing for Images this is why I want to convert the pdf to an image so I don't have to rewrite all my code.

Please help !!

加拿大约克大学毕业证成绩单/Q微信8739918加拿大文凭学历认证YU学位证diploma,留信网认证,使馆认证,offer录取通知书York University

昆特兰理工大学毕业证成绩单/Q微信8739918加拿大文凭学历认证KPU学位证diploma,留信网认证,使馆认证,offer录取通知书Kwantlen Polytechnic University

麦克马斯特大学毕业证成绩单/Q微信8739918加拿大文凭学历认证麦马学位证diploma,留信网认证,使馆认证,offer录取通知书McMaster University

萨省大学毕业证成绩单/Q微信8739918加拿大文凭学历认证UofS学位证diploma,留信网认证,使馆认证,offer录取通知书University of Saskatchewan

$
0
0

萨省大学毕业证成绩单/Q微信8739918加拿大文凭学历认证UofS学位证diploma,留信网认证,使馆认证,offer录取通知书University of Saskatchewan

曼尼托巴大学毕业证成绩单/Q微信8739918加拿大文凭学历认证UM学位证diploma,留信网认证,使馆认证,offer录取通知书University of Manitoba

$
0
0

曼尼托巴大学毕业证成绩单/Q微信8739918加拿大文凭学历认证UM学位证diploma,留信网认证,使馆认证,offer录取通知书University of Manitoba

不列颠哥伦比亚理工学院毕业证成绩单/Q微信8739918加拿大文凭学历认证BCIT学位证diploma,留信网认证,使馆认证,offer录取通知书British Columbia Institute


西安大略大学毕业证成绩单/Q微信8739918加拿大文凭学历认证UWO学位证diploma,留信网认证,使馆认证,offer录取通知书University of Western Ontario

$
0
0

西安大略大学毕业证成绩单/Q微信8739918加拿大文凭学历认证UWO学位证diploma,留信网认证,使馆认证,offer录取通知书University of Western Ontario

圭尔夫大学毕业证成绩单/Q微信8739918加拿大文凭学历认证UofG学位证diploma,留信网认证,使馆认证,offer录取通知书University of Guelph

$
0
0

圭尔夫大学毕业证成绩单/Q微信8739918加拿大文凭学历认证UofG学位证diploma,留信网认证,使馆认证,offer录取通知书University of Guelph

皇后大学毕业证成绩单/Q微信8739918加拿大文凭学历认证Queen's学位证diploma,留信网认证,使馆认证,offer录取通知书Queen's University

$
0
0

皇后大学毕业证成绩单/Q微信8739918加拿大文凭学历认证Queen's学位证diploma,留信网认证,使馆认证,offer录取通知书Queen's University

特伦特大学毕业证成绩单/Q微信8739918加拿大文凭学历认证TU学位证diploma,留信网认证,使馆认证,offer录取通知书Trent University

$
0
0

特伦特大学毕业证成绩单/Q微信8739918加拿大文凭学历认证TU学位证diploma,留信网认证,使馆认证,offer录取通知书Trent University

西三一大学毕业证成绩单/Q微信8739918加拿大文凭学历认证TWU学位证diploma,留信网认证,使馆认证,offer录取通知书Trinity Western University

$
0
0

西三一大学毕业证成绩单/Q微信8739918加拿大文凭学历认证TWU学位证diploma,留信网认证,使馆认证,offer录取通知书Trinity Western University

卡毕兰诺大学毕业证成绩单/Q微信8739918加拿大文凭学历认证Capilano学位证diploma,留信网认证,使馆认证,offer录取通知书Capilano University

$
0
0

卡毕兰诺大学毕业证成绩单/Q微信8739918加拿大文凭学历认证Capilano学位证diploma,留信网认证,使馆认证,offer录取通知书Capilano University

麦吉尔大学毕业证成绩单/Q微信8739918加拿大文凭学历认证McGill学位证diploma,留信网认证,使馆认证,offer录取通知书McGill University

$
0
0

麦吉尔大学毕业证成绩单/Q微信8739918加拿大文凭学历认证McGill学位证diploma,留信网认证,使馆认证,offer录取通知书McGill University


布鲁克大学毕业证成绩单/Q微信8739918加拿大文凭学历认证Brock学位证diploma,留信网认证,使馆认证,offer录取通知书Brock University

$
0
0

布鲁克大学毕业证成绩单/Q微信8739918加拿大文凭学历认证Brock学位证diploma,留信网认证,使馆认证,offer录取通知书Brock University

温莎大学毕业证成绩单/Q微信8739918加拿大文凭学历认证WUS学位证diploma,留信网认证,使馆认证,offer录取通知书University of Windsor

$
0
0

温莎大学毕业证成绩单/Q微信8739918加拿大文凭学历认证WUS学位证diploma,留信网认证,使馆认证,offer录取通知书University of Windsor

里贾纳大学毕业证成绩单/Q微信8739918加拿大文凭学历认证UofR学位证diploma,留信网认证,使馆认证,offer录取通知书The University of Regina

$
0
0

里贾纳大学毕业证成绩单/Q微信8739918加拿大文凭学历认证UofR学位证diploma,留信网认证,使馆认证,offer录取通知书The University of Regina

Is it possible to load an image from the Android project as an icon used on a Xamarin.Forms PCL XAML

$
0
0

Hello, I've asked part of this question already, but not sure I can figure out what to do here.
I am creating a Master Detail view based project. The flyout menu that has the list of pages, is boring, so I am trying to add icons to each menu option.
I see tons of code and samples, for loading png, jpg, files from within the PCL project it's self. But is there a way to select an icon or drawable from the android project to use in the PCL project?

For the moment my XAML looks like this at the point where it creates the menu options.

    <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <Grid Padding="8">
                        <Image Source="{Binding Icon}" />
                        <Label
                            d:Text="{Binding .}"
                            FontSize="20"
                            Text="{Binding Title}" />
                    </Grid>
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>

And then in the cs file, I am setting the Icon member (which I had created in the menu class)

        ImageSource invIcon = ImageSource.FromResource("MyApp.Resource.ic_bank.png");
        menuItems = new List<HomeMenuItem>
        {
            new HomeMenuItem {Id = MenuItemType.Inventory, Title="DetailItem", Icon=invIcon },
            new HomeMenuItem {Id = MenuItemType.LoadData, Title="LoadData", Icon=invIcon  },
            new HomeMenuItem {Id = MenuItemType.About, Title="About", Icon=invIcon  }
        };

(Yes I know I am shorting it to use the same icon across all 3, I am just trying to get it to "work" before I start adding and getting other icons.
For the moment the icons are just Material Icons I've added using the handy VS plugin.

If I need to add all the icons to platform specific folders within the PCL project, that's fine (and what I may end up doing at any rate). I was just curious if I could share and jump between the platform code and the PCL code to make the binaries smaller.

Thanks for any assistance, or confirmation I've been chasing my tail for the last day and a half LOL

Icon Creation.

$
0
0

Good day,
I tried the Android Asset Studio to create the 5 launcher icons for my Android mobile apps, but it does not work properly on my windows 10 PC.
Is their a similar free tool to use ?
I appreciate your kind help.
Regards.

Viewing all 89864 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>