A Style is basically a collection of property
settings applied to multiple instances of the same type. AStyle contains a collection of one or more Setter objects. Each Setter has a Property and a Value. TheProperty is the name of the
property of the element the style is applied to. The Value is the value that is
applied to the property.
Implicit Styles: For
example, if you create a style implicitly for all the ToggleButton controls
in your application, and your application has ToggleButton and CheckBox controls
(CheckBox derives
from ToggleButton), the style is applied only to
the ToggleButton controls.
BasedOn Styles: It is
possible to build a new style based on an existing style. You can do this using
the BasedOnproperty. This reduces the duplication
of code and makes it easier to manage resources. Each style supports only one BasedOn style.
2. UserControl:
Provides
the base class for defining a new control that encapsulates related existing
controls and provides its own logic.
3. LifeCycle Of
WindowsPhone:
App Launching=>Running=> OnNavigatedFrom(NavigationEventArgs)=>deactivated=>dormanent (stopped and no processing
takes place)=>tombstoned(app has been terminated and it will be relaunched and the
application can use the preserved data to restore state) =>Activated=> OnNavigatedTo(NavigationEventArgs) =>Closing=>raised when the user navigates backwards past the first page of
an app
4. ContentTemplate:
Gets or
sets the data template used to display the content of the ContentControl
ControlTemplate: Specifies the visual structure and behavioral aspects of a Control that can be shared
across multiple instances of the control..
Control: Represents the base
class for UI elements that use a ControlTemplate to define their appearance.
5. DataTemplate:
Describes
the visual structure of a data object.
6. ItemTemplate:
·
Gets or sets the custom
content for the data item in a control.ex:listbox
·
ItemsControl: Represents
a control that can be used to present a collection of items.
·
ItemPanelTemplate:specify the panel used to arrange the children
of your ListBox.
7. Layouts:
Windows Phone
provides a flexible layout system that enables you to specify how controls are
positioned on the screen.
i)Absolute layout(Canvas): you arrange child elements in a layout panel by specifying
their exact locations relative to their parent element
ii)Dynamic Layout(Stack Panel,Grid): To use automatic or proportional sizing, you
must assign special values to the Height andWidth properties.
8. StackPanel Vs Grid
Vs Canvas Vs WrapPanel:
StackPanel: The StackPanel is
a simple layout panel that arranges its child elements into a single line that
can be oriented horizontally or vertically.
Grid: The Grid control is the most
flexible layout panel, and supports arranging controls in multi-row and
multi-column layouts.
WrapPanel or WrapGrid : Positions child elements sequentially from left to right or top
to bottom. When elements extend beyond the container edge, elements are
positioned in the next row or column. In Windows Phone 8, consider
using the WrapPanel available in the Windows
Phone Toolkit.
9. What is Diff B/W Grid column_2 2* and column_4 2*:
Suppose there 4 columns in grid
Column _2 2*: After the Auto columns are calculated, the column gets part of
the remaining width. Column 2 will be one-half as wide as Column 4.
Column _4 2*: After the Auto columns are calculated, the column gets part of
the remaining width. Column 4 will be two times as wide as Column 2.
10. Panel:
Provides a
base class for all Panel elements.
Use Panel elements to position and arrange child
objects in Windows Phone applications.
No comments:
Post a Comment