What is the difference for TargetType=”{x:Type Button}” and TargetType=”Button”?

The XAML designer applies inbuilt type converters that convert the string value “Button” to System.Type which is Button , which makes it seem like there is no practical difference. However one should practise to use the explicit Type specification using x:Type. Explicit Type specification is required is when we inherit Styles using BasedOn, there implicit … Read more

Silverlight vs Flex [closed]

I think you should look at Silverlight as a long-term play, just as Microsoft seems to be doing. There’s an obvious balance on when to use Silverlight vs. Flash when you’re concerned about reach and install base, but here are some reasons Silverlight is a good direction to move in: Second mover advantage – Just … Read more

Bind Collection to StackPanel

Alright I have figured it out… Using an ItemsControl solved the problem… <ItemsControl x:Name=”tStack” Grid.Column=”0″> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation=”Horizontal”/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <Button Content=”{Binding ItemName}”/> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl>

How to create a style based on default style?

Pretty much the same. Just minus the x:Type with more explicit naming. <Style TargetType=”TextBox” BasedOn=”{StaticResource DefaultTextBoxStyle}”> More information here in the docs. PS, in case you need the default templates, TextBox for example would normally be found in CoreStyles.xaml ADDENDUM as requested in the comments in case you’re confused at the first read of the … Read more

Cannot install silverlight 4 tools on visual studio 2010 sp1

Found out what happened I installed first Visual Studio, and removed some components that I thought wouldn’t be necessary (c++, f#, etc). I also removed visual web developer tools (shouldn’t have done that… you’ll see why in a minute). After that, I installed Service Pack 1. Then, when trying to install the Silverlight 4 tools, … Read more

WPF vs Silverlight [duplicate]

That’s an extremely broad question. My company recently wrote a whitepaper outlining the differences between the two technologies, and it’s around 70 pages. Unfortunately, it’s not published yet, or I’d give you the link. EDIT: As promised, here’s the link to the whitepaper on Codeplex: http://wpfslguidance.codeplex.com/ However, I’ll try to summarize. WPF is a thick … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)