- Feb 21, 2015
- 4
- 0
- 0
Hi everyone!!
I just decided yesterday that I want to add some functionality to my new and first Windows Phone myself(got a Lumia 830, couldn't be happier!). Coming from a C and Python background, I am working/reading through the "Absolute Beginner Series For Windows Phone 8" to get a clear understanding of all the cool features which we can manipulate in Windows Phone. (Tutorial can be found at channel9 msdn , unfortunately I cannot write URL's yet) The reason I am writing here, is because I have some questions and I might get some more questions later on which I will also add in this first post. I am hoping somebody might be willing to (partially) answer them. It might be some of the questions are actually handled later on in the material so don't be afraid to tell me just that if you are familier with the material.
Thanks in advance!
Questions:
1. After reading section 3 on XAML, I was thinking if it might be possible to inherit one of the standard classes (like Textbox or Button) and add some common functionality that a lot of instance might share and then use th?t element in the XAML code. In other words, is it possible to add your own elements based on existing elements in XAML?
2. After thinking a little bit about how XAML works and what kind of functionality I would like to add in apps in the future, is it possible to "update" XAML code just like javascript updates HTML or is another mechanism usually used here? An example where you might use this: If a user clicks on a new Button and a new textbox must be inserted in the current page, you can of course instantiate the new Textbox in your C# code and add it as a children to the container. But XAML is used to create such content much more easily so how would you got about adding XAML code dynamically while also knowing that XAML code is actually compiled to C#? Is there like a function which you can use to inject XAML code from a C# script?
Again guys and girls, thanks very much for reading/answering any of my questions!
I just decided yesterday that I want to add some functionality to my new and first Windows Phone myself(got a Lumia 830, couldn't be happier!). Coming from a C and Python background, I am working/reading through the "Absolute Beginner Series For Windows Phone 8" to get a clear understanding of all the cool features which we can manipulate in Windows Phone. (Tutorial can be found at channel9 msdn , unfortunately I cannot write URL's yet) The reason I am writing here, is because I have some questions and I might get some more questions later on which I will also add in this first post. I am hoping somebody might be willing to (partially) answer them. It might be some of the questions are actually handled later on in the material so don't be afraid to tell me just that if you are familier with the material.
Thanks in advance!
Questions:
1. After reading section 3 on XAML, I was thinking if it might be possible to inherit one of the standard classes (like Textbox or Button) and add some common functionality that a lot of instance might share and then use th?t element in the XAML code. In other words, is it possible to add your own elements based on existing elements in XAML?
2. After thinking a little bit about how XAML works and what kind of functionality I would like to add in apps in the future, is it possible to "update" XAML code just like javascript updates HTML or is another mechanism usually used here? An example where you might use this: If a user clicks on a new Button and a new textbox must be inserted in the current page, you can of course instantiate the new Textbox in your C# code and add it as a children to the container. But XAML is used to create such content much more easily so how would you got about adding XAML code dynamically while also knowing that XAML code is actually compiled to C#? Is there like a function which you can use to inject XAML code from a C# script?
Again guys and girls, thanks very much for reading/answering any of my questions!