English 中文(简体)
Do some tasks after OnAppearing() in MAUI
原标题:

I have a maui community toolkit expander control in my page. On Tapping the header the content is shown/hidden .I got a Maui map in the expander s content. It display properly if the expander is in Expanded state. But if the page is loaded with Collapsed State the map won t be displayed properly . So I would like to keep the expander expanded once loading and after the onAppearing I would like to keep it closed. Is there any way I can call a method to change the state(IsExpanded to false) after the OnAppearing

xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit" xmlns:maps="clr-namespace:Microsoft.Maui.Controls.Maps;assembly=Microsoft.Maui.Controls.Maps"

          <toolkit:Expander x:Name="expander" IsExpanded="True" ExpandedChanged="Expander_ExpandedChanged">
                <toolkit:Expander.Header>
                     
                    <Label Text="Show/Hide "
               FontAttributes="Bold"
               FontSize="Medium" />
                </toolkit:Expander.Header>
                <toolkit:Expander.Content>
                    <StackLayout Margin="0" Orientation="Horizontal ">
                        <maps:Map x:Name="map" HeightRequest="300" IsShowingUser="True" MapType="Satellite"/>
                    </StackLayout>
                    

                </toolkit:Expander.Content>
                
               

            </toolkit:Expander>
问题回答

暂无回答




相关问题
Selecting Links in Google Maps InfoWindows w/ jQuery

In my web app, I am using jQuery to select all the links on the page and intercept where they go to so that I can switch to a different part of the page with AJAX. The problem is that some of these ...

Add custom control to Subgurim Maps

Is it possible to add a custom control to the GMap control in the Subgurim library? I see that I can add a GControl with the GMap.AddControl method. I tried to create a custom GControl by ...

Changing the value in a map in Groovy

This is about a very basic program I m writing in Groovy. I have defined a map inside a method: def addItem() { print("Enter the item name: ") def itemName = reader.readLine() print(...

Best way to store and retrieve this..?

I ve been trying all night, and talk of maps, arrays, vectors and hash_maps have filled my head. im just confused now. i posted a previous question here: C++ map really slow? problem was fixed but it ...

热门标签