docs icon indicating copy to clipboard operation
docs copied to clipboard

Exception!

Open LisandroSu opened this issue 8 years ago • 8 comments

@1277201882 commented on Sun Aug 26 2018

In file ExpenseItHome.xaml.cs InitializeComponent() is wrong and give me an exception.


文档详细信息

⚠ 请勿编辑此部分。 docs.microsoft.com ➟ GitHub 问题链接必须具有此部分。


@imba-tjd commented on Sun Aug 26 2018

I can't reproduce it.

LisandroSu avatar Aug 27 '18 15:08 LisandroSu

Hi Team,

Can you check on this issue reported by the user?

Thanks!

LisandroSu avatar Aug 27 '18 15:08 LisandroSu

I can't reproduce it, either.

JRAlexander avatar Aug 27 '18 16:08 JRAlexander

Hello, @1277201882

Can you provide us more information regarding the issue?

Thanks!

LisandroSu avatar Aug 27 '18 16:08 LisandroSu

I think I'm running into the same issue. When I try to build and run the application per Step 8 of "Add an image and a title," the debugger throws an IOException saying it "Cannot locate resource 'watermark.png'. I assume I missed something in the earlier step when I added the image to the project but I don't know what that may be since there were only two seemingly straightforward steps.

ghost avatar Aug 31 '18 20:08 ghost

FYI, the watermark.png file shows up under the Solution Items tab in the Solution Explorer after I added the image if that is relevant.

ghost avatar Aug 31 '18 20:08 ghost

Resolved it. I clicked and dragged the watermark.png file from the Solution Items on the Solution Explorer and dropped it under the C# ExpenseIt item and the application ran without issues.

ghost avatar Aug 31 '18 22:08 ghost

private void Button_Click(object sender, RoutedEventArgs e)
{
    //View Expense Report
    ExpenseReportPage expenseReportPage = new ExpenseReportPage(); //Line 1
    this.NavigationService.Navigate(expenseReportPage); //Line 2
}

Line 2 in above code gives following error for NavigationService:

'<invalid-global-code' does not contain a definition for 'NavigationService' and no accessible extention method 'NavigationService' accepting the first argument of type '' could be found (are you missing a using directive or an assembly reference ?)

I have added the using System.Windows.Navigation; I think the problem is coming from 'this' part of this.NavigationService.Navigate(expenseReportPage);

Please Help!

Thanks in advance.

kingshez021 avatar Feb 18 '19 15:02 kingshez021

The original issue was resolved. Closing.

BillWagner avatar Nov 19 '19 22:11 BillWagner