Need help with page in book

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

36 Replies - 1922 Views - Last Post: 15 May 2017 - 03:43 PM

#1 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Need help with page in book

Posted 10 May 2017 - 06:37 PM

So I can't figure this part out, on the Cross platform Xamarin c# book can be found here : https://developer.xa...-xamarin-forms/

On page 225 it wants us to input this code Xamarin.FormsBook.Toolkit.Toolkit.Init();

But it doesn't exist for me, I followed the steps made a new project class library made that class on page 223 and not working. It does say on page 222 to include this part but I don't know which file to put it in:

"You can use this library yourself in your own applications by adding a reference to it. You can then
add a new XML namespace declaration in your XAML files like so to specify this library:
xmlns:toolkit="clr-namespace:Xamarin.FormsBook.Toolkit;assembly=Xamarin.FormsBook.Toolkit"

This post has been edited by Dialupp: 10 May 2017 - 06:38 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Need help with page in book

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13493
  • View blog
  • Posts: 53,899
  • Joined: 12-June 08

Re: Need help with page in book

Posted 10 May 2017 - 07:06 PM

Have you looked at the samples?
https://github.com/x...ms-book-samples

Searching "Xamarin.FormsBook.Toolkit.Toolkit.Init" led me to those.
Was This Post Helpful? 0
  • +
  • -

#3 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Re: Need help with page in book

Posted 10 May 2017 - 10:19 PM

Oh is that what it was referring to? In that case I haven't seen it. So it says to make a project but examples are on github so what do I do?

This post has been edited by Dialupp: 10 May 2017 - 10:19 PM

Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13493
  • View blog
  • Posts: 53,899
  • Joined: 12-June 08

Re: Need help with page in book

Posted 10 May 2017 - 10:48 PM

Ah... Look at using the examples and samples?
Was This Post Helpful? 1
  • +
  • -

#5 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Re: Need help with page in book

Posted 11 May 2017 - 12:26 AM

Ok I'll see how it goes. Thanks.
Was This Post Helpful? 0
  • +
  • -

#6 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6508
  • View blog
  • Posts: 14,375
  • Joined: 02-June 10

Re: Need help with page in book

Posted 11 May 2017 - 03:10 AM

Starting back around page 222 the author has you make the library project that he's referring to. So that by the time you reach page 225 you can add it to your solution. He first describes what you're going, then walks you through doing it, adding the code, saving it... Did you do all that?

Posted Image

This post has been edited by tlhIn`toq: 11 May 2017 - 03:11 AM

Was This Post Helpful? 0
  • +
  • -

#7 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Re: Need help with page in book

Posted 11 May 2017 - 03:43 PM

I think sort of I will try it again. Thanks.
Was This Post Helpful? 0
  • +
  • -

#8 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Re: Need help with page in book

Posted 11 May 2017 - 06:42 PM

This is shit I just made a project called Xamarin.FormsBook.Toolkit and I get 42 errors. Either I am not doing it properly or this book isn't explaining it properly.
EDIT:
I deleted the file Xamarin.FormsBook.Toolkit.cs, now its gone nevermind.

This post has been edited by Dialupp: 11 May 2017 - 06:44 PM

Was This Post Helpful? 0
  • +
  • -

#9 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Re: Need help with page in book

Posted 11 May 2017 - 06:58 PM

Though I can't run this I get this error "a project with an output type of class library cannot be started directly."
Was This Post Helpful? 0
  • +
  • -

#10 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13493
  • View blog
  • Posts: 53,899
  • Joined: 12-June 08

Re: Need help with page in book

Posted 11 May 2017 - 07:03 PM

Is that a question, or just for information?
Was This Post Helpful? 0
  • +
  • -

#11 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Re: Need help with page in book

Posted 11 May 2017 - 07:24 PM

Just info I guess I got this error, just want to know if I am doing it correctly.

This is what I did create a new project called Xamarin.FormsBook.Toolkit
this is the class library.

Then I deleted that cs file that it told to delete.

I just realized that customExtensionDemo program they provided has the Xamarin.FormsBook.Toolkit namespace. Now I am confused. They didn't write this out properly, theres no clear steps.

I tried to run the customExtensionDemo by it self and gave errors about the script like:

Severity Code Description Project File Line Suppression State
Error CS0006 Metadata file 'E:\Downloads\xamarin-forms-book-samples-master\xamarin-forms-book-samples-master\Libraries\Xamarin.FormsBook.Toolkit\Xamarin.FormsBook.Toolkit\bin\Debug\Xamarin.FormsBook.Toolkit.dll' could not be found CustomExtensionDemo E:\Downloads\xamarin-forms-book-samples-master\xamarin-forms-book-samples-master\Chapter10\CustomExtensionDemo\CustomExtensionDemo\CustomExtensionDemo\CSC
Was This Post Helpful? 0
  • +
  • -

#12 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Re: Need help with page in book

Posted 11 May 2017 - 08:47 PM

Also none of the projects work that they provided so I don't know what to do.
Was This Post Helpful? 0
  • +
  • -

#13 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6508
  • View blog
  • Posts: 14,375
  • Joined: 02-June 10

Re: Need help with page in book

Posted 12 May 2017 - 02:00 AM

I can tell ya right now its not the book. That book went through two long pre-release phases before the final release. I've seen boxes of them handed out for free at several Microsoft conventions such as the big Xamarin Evolve 2016. Thousands more copies downloaded. Countless people on the Xamarin forum have worked there way through it and posted a question here or there (mostly things they didn't know about C# like lambdas) but most praise it.

My only complaint about the book is that it shows way too much UI creation in C#. I get that its legal, and sometimes (5% of the time) what you need to do. But showing a bunch of rookies that are migrating from not knowing any better just makes it seem like that's the *right* way from day 1. It doesn't do them any favors. It might make their migration from WinForms or Mac Swift easier but real world software enterprises just don't put up with it.
Was This Post Helpful? 0
  • +
  • -

#14 Dialupp  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 210
  • Joined: 31-October 16

Re: Need help with page in book

Posted 12 May 2017 - 04:39 AM

Well what's your advice? What do I do? I can't make progress because of this.
Was This Post Helpful? 0
  • +
  • -

#15 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13493
  • View blog
  • Posts: 53,899
  • Joined: 12-June 08

Re: Need help with page in book

Posted 12 May 2017 - 05:20 AM

If you are not getting it then take a break, put it down, and come back to it in a few days to reread the chapter.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3