Coder Social home page Coder Social logo

appconsult-winappsmodernizationworkshop's Introduction

Here are all the instructions for the exercises

Manual


Contributing

The master branch is locked. Let's have a branch for each one in the AppConsult team for individual work.

The proposed contribution guideline is:

  1. Create a new branch for your work only. If you want, for simplicity name it with your name or alias.
  2. Before you start to work on your branch, get the latest version of the master branch with git fetch and git rebase -i origin/master. Resolve conflict if any.
  3. Do you work, commit, commit... and push your changes to your branch with git push.
  4. When you are ready to merge, get the latest version of master, rebase your branch and resolve conflict with git fetch and git rebase -i origin/master.
  5. You are ready to go, you can then do your pull request to the master branch.
  6. Matteo and I will approve it.

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

appconsult-winappsmodernizationworkshop's People

Contributors

bartlannoeye avatar kant avatar luishdemetrio avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar oliag avatar qmatteoq avatar runceel avatar sbovo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appconsult-winappsmodernizationworkshop's Issues

Save button in AddNewExpense doesn't become to enable

After end of Exercise 3, Save button can't click just after filled all form items.

Repro step:

  • Input Type, Description, Amount, Location, City, and select date on CalendarView.

image

If setting focus any textbox control, then the Save button become to enable.

image

Need one more point to cleanup at Exercise 4

At end of Exercise 4, there is one more method that must be removed at AddNewExpense.xaml.cs.
It is ChildChanged event handler that was added at Exercise 3.

        private void CalendarUwp_ChildChanged(object sender, System.EventArgs e)
        {
            WindowsXamlHost windowsXamlHost = (WindowsXamlHost)sender;

            Windows.UI.Xaml.Controls.CalendarView calendarView =
                (Windows.UI.Xaml.Controls.CalendarView)windowsXamlHost.Child;

            if (calendarView != null)
            {
                calendarView.SelectedDatesChanged += (obj, args) =>
                {
                    if (args.AddedDates.Count > 0)
                    {
                        Messenger.Default.Send<SelectedDateMessage>(new SelectedDateMessage(args.AddedDates[0].DateTime));
                    }
                };
            }
        }

ArgumentException at Exercise 4 Task 2

I watch following error on the Output Window.

System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=Date; DataItem='AddNewExpenseViewModel' (HashCode=18970462); target element is 'CalendarViewWrapper' (Name=''); target property is 'SelectedDate' (type 'DateTimeOffset') ArgumentException:'System.ArgumentException: Object of type 'System.DateTimeOffset' cannot be converted to type 'System.DateTime'.
   at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
   at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
   at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
   at MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
   at System.Windows.Data.BindingExpression.UpdateSource(Object value)'

The cause of this error is type missmatch between SelectedDate property of CalendarViewWrapper to Date property of AddNewExpenseViewModel.

CalendarViewWrapper one is DateTimeOffset. AddNewExpenseViewModel one is DateTime.

After change the property type of AddNewExpenseViewModel.Date and Expense.Date the error was fixed.(In fact, the End folder of Exercise 4 is changed to DateTimeOffset.)

I think that adding this step at step 6 of Exercise 4 Task 2 is good for fixing the issue.

Which VS version to use

Hi there
Which VS version is needed to open exercises' solutions?
I'm asking because I still don't have 19 on my prod machine (the one i'll bring at Build), mostly working with VS Code and Python nowadays, and looking at the Exercise 1 sln file it seems was created with an early VS19 version not even reported in the Visual Studio build numbers and release dates.
My plan is to install VS19 16.0.1 Release in the next days, would it be good to run all the Exercises?

On a side note: i received the Post Day training confirmation from eventcore, the same also attendee received (i suppose), checked out the Build registration site for the Post event, and i didn't find any information if attendee has to bring their own laptop (plus all the software needed eg VS 19 version) or if there will be a pc for any of the attendee

thank you
/gp

@qmatteoq this is obviously a question but i don't have rights to add the appropriate label

COMException ocurred at end of Exercise 4.

When selecting same date on the CalenderViewWrapper control, then following error is occurred.

image

I think that you need the length check before accessing AddedDates property at the SelectedDatesChanged event handler like below:

private void CalendarView_SelectedDatesChanged(CalendarView sender, CalendarViewSelectedDatesChangedEventArgs args)
{
    // Add using System.Linq;
    if (args.AddedDates.Any())
    {
        SelectedDate = args.AddedDates[0];
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.