Shalvin Interests

Wednesday, July 13, 2011

Silverlight Styles

Styles is a collection of property value you can apply to an element. In a way it is equivalent to the functionality of CSS in HTML. You store style object as a resource.

<UserControl.Resources>
    <Style x:Key="SimpleStyle" TargetType="Button">
        <Setter Property="Foreground" Value="Blue" />
        <Setter Property="Background" Value="Cyan"/>
    </Style>
</UserControl.Resources>

<Grid x:Name="LayoutRoot" Background="White">
    <Button Style="{StaticResource SimpleStyle}" Content="Button" Height="23" HorizontalAlignment="Left" Margin="50,76,0,0" Name="button1" VerticalAlignment="Top" Width="75" />
    <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="50,137,0,0" Name="button2" VerticalAlignment="Top" Width="75" />
</Grid>

Monday, July 11, 2011

Attached Property

Attached property is a special kind of Dependency Property. Attached propety applies to a class other than one where it is defined.

The best example of Attached property is the Row and Column Properties of Grid class. You set these properties inside the elements in a Grid.

Silverlight Dependency Property

Dependency Property include a mechanism that at any point of time determines what the value of propery should be based on several incluences working on the property such as databinding, styling and so on. These multiple services are called property providers They can be considered as the enabler for animation, databinding, styling and so on.

These different properties are prioritized. Animation is having the highest priority. This prioritization process is called dynamic value resoultion.

The list is as follows :
1. Animation
2. Local value. If you set a value using Resources or data binding it is considered as locally set
3. Styles
4. Property Value Inheritance
5.Default Value

Silverlight FullScreen

private  void btnFullScreen_Click(object sender, RoutedEventArgs e)
{
Application.Current.Host.Content.IsFullScreen = true;
}

Friday, July 8, 2011

UIElement class in Silverlight

UIElement is an object that represents a visual component. These types of elements
A have built-in support for layout, event handling, and rendering.

Silverlight/WPF Object Tree and Visual Tree

The hierarchical tree of objects in XAML file starting from the root going all the way down to elements make up the Object Tree. Object tree contains all types regardless of whether they participate in rending.

Visual Tree is a filtered view of Object Tree containing only those elements with a visual representation.

Thursday, July 7, 2011

User Group Meeting - 9th July 2011 - Kochi

09:30 - 09:40 Community updates
09:40 - 10:40 C# Test Automation by Praseed

10:40 - 11:20 Silverlight - Prism by Mahima
11:20 - 11:40 Tea Break (15 min)
11:40 - 12:30 Sharepoint 2010 programing by Abraham
12.30 - 01:00 Ask the experts


Register