Posts Tagged ‘Silverlight’

XAML: blend behavious and markup extensions

November 18, 2012

A book, an article, a blog post … but a good lesson is something you cannot miss!

Here is Miguel Castro sessions, last NDC 2012: Extending XAML To Overcome Pretty Much Any Limitation.

2nd part is about Blend behavious and Markup extensions,
to me the most interesting 😉

Just a helpfull example: ContentMargin attached property (thanks to Steven Hollidge). 😉

source: Extending XAML To Overcome Pretty Much Any Limitation

Technorati tags: XAML, Blend

Advanced MVVM

October 21, 2012

Advanced MVVM by Josh Smith

Amazon:

This e-book is for WPF and Silverlight developers looking to take their Model-View-ViewModel skills to the next level. It reviews how the MVVM design pattern was used to create a fun and addictive game that provides an elegant user experience. Read this e-book to gain insights from Josh Smith, an industry recognized expert in WPF, Silverlight, and MVVM, on how to properly design complex View and ViewModel architectures. Learn how to support unlimited undo, coordinate animated transitions, control modal dialog boxes from a ViewModel, and much more.

Me: I read this book a long ago, when I started writing WPF+MVVM apps. It was helpfull that time, and for WPF/SL+MVVM beginners it’s still husefull.
In your early steps in MVVM, better read it.
It’s less da 60 pages and it’s a very good example about developing a MVVM application.
😉

source: Advanced MVVM

Technorati tags: WPF,Silverlight,MVVM

Il terremoto … e Silverlight

May 31, 2012

Il terremoto in Emilia di questi giorni, alcune scosse sono arrivate anche alle regioni vicine, Lombardia e Veneto (qui).

Ho sentito anche io le scosse di Martedi 29 Maggio.
Mi è tornato un mente un esempio in Silverlight ad opera di Andrea Boschin, presentato al Remix Italia 2010.

L’esempio torna d’attualità proprio in questi giorni: geo referenziazione delle scosse di terremoto su mappa.
Trovate tutte le info qui, prima voce “Silverlight: da zero alla prima applicazione”, qui la demo.

source #1: Slide e demo Remix 2010
source #2: Demo from Italy Remix 2010

Technorati tags: Silverlight,Terremoto

Checkbox: where is Wrap ?

January 8, 2011

CheckBox doesn’t have Wrap Property for Content Property…
because Content is an object type (did it remember you anything similar?)
😦

What if Content has short text ?
Here is an example, some controls in a grid.

  <CheckBox Content="check"
            Grid.Row="1" Grid.Column="0"
            />

And what is Content has a longer text ? ;(

  <CheckBox Content="check this bla bla bla bla"
            Grid.Row="1" Grid.Column="0"
            />

The solution: custom Content, of course!

Here is a very simple example. 🙂

  <CheckBox Grid.Row="1" Grid.Column="0">
            <TextBox Text="check this bla bla bla bla" 
					TextWrapping="Wrap" 
					BorderThickness="0"
					/>
  </CheckBox>

source: How to make the text of a CheckBox wrap across multiple lines

Technorati Tags: ,,,.

Silverlight 3: scrollbars not working

December 26, 2010

Silverlight and WPF share a lot… except for a few controls not jet available in SL3 😦
Based on my last post, Scrollbars not working, that solution doesn’t work SL3: DockPanel is not available 😦
So, what could we do?  Replace that StackPanel with a Grid!
Here is an example:

<Grid>
  <Grid.RowDefinitions>
    <RowDefinition Height="Auto" />
    <RowDefinition />
    <RowDefinition Height="35" />
  </Grid.RowDefinitions>

  <!-- search form -->
  <Grid Grid.Row="0"> ...</Grid>

  <!-- listbox results -->
  <ListBox Grid.Row="1">...</ListBox>

  <!-- buttons -->
  <Button Grid.Row="2">... </Button>
</Grid>

A simple tuning with RowDefinition‘s Height property (*, Auto, fixed, none) does the remaining part of the job. 🙂
but this is another post 😉

ps: Listbox has its own scrollbars, don’t forget it!

Technorati Tags: ,,.