Metro Style Window in WPF

Follow the previous post, Metro Style ListBox in WPF, I am going to introduce the Metro Style Window in WPF.

MetroWindowResult

Continue reading

Advertisements

Metro ListBox in WPF

With the latest design strategy of Microsoft, Metro Style is dominating the entire internet. It is not difficult to find many websites adapted some elements of metro style. For Windows 8, you can fully feel the power of Metro Style.

Today, I am going to show you how to turn your ListBox (WPF / Silverlight) into Metro Style.

The result ListBox will be as below.

MetroListBox Continue reading

Watermark TextBox

Searching on the Internet about creating a watermark TextBox, there are many ways to achieve but finally I do it on my own.

<Grid Width="182" Margin="2">
    <Rectangle Fill="White"/>
    <TextBlock Margin="4,3" Text="Search..." FontFamily="Segoe UI"
    Foreground="#FFC0C0C0" FontSize="20" FontStyle="Italic"
    Visibility="{Binding ElementName=txtSearchBox, Path=Text.IsEmpty,
    Converter={StaticResource booleanToVisibilityConverter}}"/>
    <TextBox x:Name="txtSearchBox" BorderThickness="0" Margin="0,3"
    FontSize="20" FontFamily="Segoe UI Light" Background="Transparent"  />
</Grid>

Continue reading