Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9130043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:53:03+00:00 2026-06-17T07:53:03+00:00

My problem is with event. In AppBar all events, which I to inventend, they

  • 0

My problem is with event. In AppBar all events, which I to inventend, they didn’t to worked. (MessageDialog or other event ), when AppBar to showed, I can’t hiding, and In AppBar didn’t to worked click in button.

<Page.BottomAppBar>
<AppBar x:Name="AppBar" Background="#FF1DB05F">         
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">                  
        <Button x:Name="SaveButton" Style="{StaticResource AppBarButtonStyle}"
         Content="&#xE105;"

         AutomationProperties.Name="Save" >                       
           <WinRtBehaviors:Interaction.Behaviors>        
                <Win8nl_Behavior:EventToCommandBehavior Event="Tapped"

                                          Command="NewFileXml"

                                          />     
            </WinRtBehaviors:Interaction.Behaviors>

        </Button>

In MainViewModel.cs

public async void NewFileXml()
        {

            XmlDocument dom = new XmlDocument();
            XmlComment comment = dom.CreateComment("This is Goal a Year");
            XmlElement x;
            dom.AppendChild(comment);
            x = dom.CreateElement("Goal of a Year");
            dom.AppendChild(x);

            XmlElement stepXml = dom.CreateElement("Goalyear");
            XmlElement goalYearXml = dom.CreateElement("GoalStep");
            stepXml.InnerText = GoalYear;
            goalYearXml.AppendChild(stepXml);

            Windows.Storage.StorageFolder sf = await Windows.ApplicationModel.Package.Current.InstalledLocation.CreateFolderAsync("GoalPlan");
            StorageFile st = await sf.CreateFileAsync("GoalYear.xml");
            await dom.SaveToFileAsync(st);
        }
        public  ICommand NewFile
        {
            get
            {
                return new RelayCommand(() =>
                    {

                        NewFileXml();

                    });
            }
        }

I did with help from Polish Microsoft. Maybe Someone that to add.

 private RelayCommand exampleContent;
            public RelayCommand ItIsBind
            {
                get
                {
                    return exampleContent ?? (exampleContent = new RelayCommand(ContentLoad));
                }
            }
**Method example**
public void ContentLoad()
{

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:53:04+00:00Added an answer on June 17, 2026 at 7:53 am

    There are a couple of possible issues here…

    1) Your command is not named “NewFileXml”, but “NewFile”
    2) You don’t appear to be setting your DataContext – are you doing this elsewhere (if so, you haven’t shown it)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i've a performance problem with this query: @event = Event.find_by_sql( SELECT * FROM `IdeProNew_development`.`events`
I have a spreadsheet which extracts and accumulates all the required data from other
I'm having a problem getting a change event to register with the following code:
I'm having a problem with handling an event on a different thread from where
The problem: making a very simple style switcher with js (without inline event handling).
I have a strange problem where an onclick event on an input image is
I have problem with casting custom event currentTarget to component. When I'm trying to
I've got a problem with adding Expanded event to my Expanders. I have expanders
I have a problem with the onScroll event of the OnGestureListener. the method signature
I have a problem trying to register my own Event/Listener to the event dispatcher.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.