English 中文(简体)
人口规模总是等于其内容的大小
原标题:Make popup size to be always equal to the size of its content
问题回答

<>SamplePopup>xaml for Popup:

<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
               xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
               xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
               Color="Transparent" 
               x:Class="SampleApp.SamplePopup">
    <Grid>
        <Frame VerticalOptions="Center">
            ...
        </Frame>
    </Grid>
</toolkit:Popup>

Use Grid for Primary Structure,
And VerticalOptions of Secondary Element set to Center.
And, Of course, The Color of Popup set to Transparent.

Hope to solved your problem too! Enjoy!





相关问题
Cannot pair with mac running Ventura

We have a Windows Server 2016 machine that we use to build our Xamarin projects. We recently upgraded our macOS to Ventura and since have not been able to pair Visual Studio to the mac. I have ...

Using C# library with Mono for Android from Java code?

There is a possibility to use C# library with Mono for Android from Java code? It s possible to do it from Objective-C to C# (MonoTouch) with the "--xcode" flag in the mtouch command. But there is an ...

Draw into UIImage

how can I draw into an existing UIImage using monotouch? I load an image: UIImage.FromFile("MyImage.png") Then I want to draw a string and some lines into this image. Does anyone has a code sample? ...

Writing Android apps in C# (Xamarin) [closed]

I m a C# programmer and want to write an Android app. I m a stubborn curmudgeon and refuse to write Java ever again (after switching to C# six years ago). Besides Mono and MonoDroid (and writing Java)...

access denied when i want to open up file

in xamarin android why access is denied when i want to BufferedStream my file? fileAddress= "/storage/emulated/0/Download/rename2.pdfl"; Reader = new BufferedStream(File.OpenRead(...

热门标签