No Iunea de View/Interfa Ă Ț Ț
No Iunea de View/Interfa Ă Ț Ț
- Navigation Events
Occurs when navigation to a content fragment begins,
which occurs immediately, if the desired fragment is in
the current content, or after the source XAML content has
been loaded, if the desired fragment is in different
content.
- Content Template
Gets or sets the data template that is used to display the
content of the ContentControl.
XAML Values
dataTemplate
templateReference
Layout overview
Absolute layout
Dynamic layout
Panel controls
Related Topics
Layout overview
Layout is the process of sizing and positioning objects in
your app for Windows Phone. To position visual objects,
you must put them in a container control derived
from Panel or another container object. Windows Phone
provides various Panel controls, such
as Canvas, StackPanel, and Grid, that serve as containers
and enable you to position and arrange the controls.
The Windows Phone layout system supports both an
absolute layout and a dynamic layout. In an absolute
layout, controls are positioned using explicit x/y
coordinates (for example, by using a Canvas). In a
dynamic layout, the user interface automatically sizes to
various screen resolutions (for example, by using
a StackPanel or a Grid).
- Diff Grid Option
Notes to Implementers
1. If using in your own code, why not use List as a base class
instead?
Collection<T> provides some protected methods so you can
easily override the behavior and completely enroll your own
business logic, like:
ClearItems()
InsertItem()
RemoveItem()
SetItem()
List<T> does not provide them and has almost no protected
methods to overrides behavior, which makes customizing it
harder.
2. Does it really ever make sense to initialize a new Collection in
your own code in place of List?
No, not just for the sake of initializing some collection. Use it if
you need it as a base class for implementing your own logic.
This will depend on your own business needs. For almost all
cases in daily development work, the existing - and numerous -
collections should already provide what you need. There are type
safe and untyped collections, thread-safe collections, and
whatever else you can think of.
Still, one day there may be a demand for implementing a
collection type that does certain valididation checks before it
allows to add/update/delete any items in it or that handles moving
to the next item in a only sparsely populated list in a specail
manner. You never know what ideas a customer may have.
In those case it might help to create your own collection type.
- WebClient vs HttpWebRequest
Speaking of comparing these two
HttpClient is more closer to HTTP than WebClient.
HttpClient was not meant to be a complete replacement of
Web Client, since there are things like report progress, custom
URI scheme and making FTP calls that WebClient provides
but HttpClient doesnt.
If youre using .NET 4.5, please do use the async goodness with
HttpClient that Microsoft provides to the developers. HttpClient is
very symmetrical to the server side brethren of the HTTP those
are HttpRequest and HttpResponse.
Update: 5 Reasons to use new HttpClient API:
Strongly typed headers.
Shared Caches, cookies and credentials
Access to cookies and shared cookies
Control over caching and shared cache.
Inject your code module into the ASP.NET pipeline. Cleaner
and modular code.
HttpClient is the newer of the APIs and it has the benefits of
has a good async programming model
being worked on by Henrik F Nielson who is basically one of
the inventors of HTTP, and he designed the API so it is easy
for you to follow the HTTP standard, e.g. generating
standards-compliant headers
is in the .Net framework 4.5, so it has some guaranteed level
of support for the forseeable future
also has the xcopyable/portable-framework version of the
library if you want to use it on other platforms - .Net 4.0,
Windows Phone etc.
If you are writing a web service which is making REST calls to
other web services, you should want to be using an async
programming model for all your REST calls, so that you don't hit
thread starvation. You probably also want to use the newest C#
compiler which has async/await support.
Note: It isn't more performant AFAIK. It's probably somewhat
similarly performant if you create a fair test.
Metode Asynchrone(async/await)
Metoda care va fi rulata asincron trebuie sa intoarca void, task sau
task<T>.Metoda apelanta care foloseste in interiorul sei aeplul wait
trebuie marcata ca async.Compilatorul deduce acest patern automan.
Await foloseste SynchronizationContext penrtu a continua pe acelasi
thread pe care async a pornit.
Threads:
Thread este cea mai mica unitate de procesare ce poate fi programata
spre executie de catre sistemul de operare.Este folosit pentru a executa
portiuni distincte din cod in parallel in interiorul aceluiasi
process.Corpul threadurilor nu sunt complet independente si in anumite
momente ale executiei se poate intimpla ca un thread sa astepte executia
altui thread.
Protocolul HTTP:
Protocol la nivel de aplicatie destinat sistemelor de informare distribuite
de genul hypermedia.Aplicatiile care folosesc acest protocol sunt
entitati abstracte din punct de vedere al protocolului.Ele trebuie doar sa
poata ,,comunica,, intre ele pentru formulare de cereri de receptionare
de raspunsuri.Cererile formulate in acest protocol se refera la informatii
care pot fi stocate in diverse baze de date in diverse formate pe diverse
calculatoare.
Metode:
-Options(optiunile de comunicare disponibile pe conexiune)
-Get(metode care aduce ceva de la resursa, adduce doar un singur
raspuns la o intrebare)
-Head(asemanator ca Get doar ca raspunsul e in forma de cod de
success sau eroare)
-Post(metoda prin care resursei specificate in cerere I se cere sa isi
subordoneze datele incluse in entitatea care trebuie sa insoteasca
cererea).
-Put( asemator ca Post capabila sa stocheze si memorize entitatea
cuprinsa In cerere cu numele specificat in URI)
-Patch(metoda ca Put ce nu contine date ce defines resursa)
-Copy,Move,Delete(metode ce permit lucrului asupra cererei. De
copier, mutare, stergere)
-Link si Unlink(stabilesc relatiile intre cereri de legare/dezlegare)
-Trace(metoda ce arata cum ajung cererile la server)
-Wrapped(metoda ce ofera transmiterea mai multor cereri in una)
Cimpuri:
-Cookie,ETag,Location,HTTP referrer,DNT,X-Forwarded-For
XML/Json:
XML foloseste un format de organizare de tip arbore,standartizat bazat
pe text pentru stocarea de informatii ce pot fi citite usor din
aplicatii.Este folosit pentru stocarea oricarui tip de date .
Json este un format de reprezentare si interschimb de date intre aplicatii
informatice.Este un format text, inteligibil pentru oameni utilizat pentru
reprezentarea obiectelor si altor structure de date pentru a fi transmise
prin retea in mod structurat.Json este o alternativa mai simpla decit
limbajul XML.
RegEx:
Un sir de caractere care descriu un model de cautare in alt sir de
caractere.Cu ajutorul expresiilor regulare se pot gasi si inlocui portiuni
anumite din text si este o metoda puternica de verificare pentru
valididatea adreselor email , domeniilor de internet , sau codului
postal.Este folosita pentru analizarea fisierelor mai mari in text si a
cautarii informatiei droite.
HTML Parsing/xPath:
Parsing permite accesarea cu usurinta si modificare a codului html si
contine o multime de biblioteci ce permite parsarea documentelor in
diferite limbaje de programare.
xPath este un limbaj de expresii ce permite selectarea portiunilor
dintrun document XML sau pentru calcularea valorilor pe baza
continutului unui document XML.Acest limbaj este structurat in forma
de arbore a documentului XML si ofera posibilitatea de navigare in
acest arbore prin selectia nodurilor ce satisfac anumite cereri.